Musical episodes have become a standard for television shows, fueled by the success of Buffy the Vampire Slayer Season 6, Episode 7, "Once More with Feeling." The Star Trek franchise gets onboard with Strange New Worlds Season 2, Episode 6, "Subspace Rhapsody," as a quantum singularity causes the crew to spontaneously break out in choreographed musical numbers. It's hardly an original moment, but it gives fans a breather after the previous episode -- "Under the Cloak of War" -- went very dark. It also gives the characters a chance to sort through their various relationships, which have lately taken a turn for the messy.
Source:https://www.cbr.com/star-trek-strange-new-worlds-anything-goes-song-explained/