If you're connecting by HDMI Arc check you’re using the correct HDMI Arc port on the TV (ARC is usually printed next to the socket) and select HDMI audio out in the TV's Sound output settings.
If these are already set unplug/switch off the TV and Soundbar at the power socket for 10 mins then power on again and try it.