This article explains how to connect the Sonos Beam to a TV.
How to Connect Sonos Beam to TV
Traditionally, Sonos products are set up through the app to enable wireless communication, but with the Sonos Beam TV speaker, a more traditional setup is involved: you'll need to run cables from your Beam to your TV to get it working.
Make sure your TV is connected to a power outlet and has an HDMI-ARC or optical connection available.
Make sure your Sonos Beam is plugged into a power source and that you have your HDMI or HDMI-to-optical cable handy.