As it stands the question is a bit too vague to answer.
You might have presumed that all TVs and all sound bars are the same. That's understandable and it's a fairly common mistake, but it's akin to assuming all shoes are the same. While they all fit on feet, trainers are not work boots and are not stilettos.
There's not such a vast difference with smart TVs or with sound bars, but there's enough that a one-size-fits-all answer won't work, just like wearing stilettos on a building site wouldn't be the right answer.
Some stuff to do with your system is stupidly easy. The Humax connects to the TV with a HDMI cable. That's it. It's no more complicated than that. So really, the rest of your question revolves around how to make the sound bar work with the TV and hence the Humax. There's enough differences within "smart TVs" and "Yamaha sound bars" that we really could do with knowing which models you've bought. For example, Yamaha makes sound bars that range in price from £150 to over £1000 once all the optional bits are added. That changes how they might connect and what can be achieved with them.
In general terms, if both your TV and sound bar have HDMI ARC sockets then connect with a HDMI cable. If only one device has this then you'll need a different connection using an Optical lead.