What app are you using to stream music.
First..all devices have to be on the same WiFi network.
- To stream from the Sonos app you have to have a subscription to the streaming service like Spotify (or another service) for example and then add it to the Sonos app.
- To stream directly from the streaming service app on your device using Spotify again as the example you just have to click the speaker icon in its app and select the Sonos speaker.
- You can also stream directly from the Apple Music app on your device using Airplay to a capable Sonos Speaker.
Bottom-line your TV does not have to be on to stream music to a Sonos soundbar. So you need to tell us exactly what you are doing to stream music to your Sonos.
BTW…there is a difference between what you call Casting (which typically involves video) and Streaming which is audio only. Casting does require that the TV be turned on whereas Streaming music to Sonos does not.