Without model numbers we can't know what connections you have available on the TV or soundbar.
Check the TV and soundbar manuals to see if both have bluetooth that will allow you to get TV sound to the soundbar.
If not then use a wired connection. More reliable anyway and the soundbar can't be far from the TV so a long cable would not be needed.