Rather than repeat all that's been written I'll keep it short.
The usual hookup to get 5.1 (HD audio) is like this.
Source -> Receiver -> HDTV (or UHD.)
Then a final optical link from HDTV to receiver for other things.
HDMI cables can matter so be sure they are latest with the wires needed for all this. Here I just get Amazonbasics HDMI cables for about 6 bucks and it works.
I'm finding the seller and makers are usually quiet about this issue.
We recently purchased a Samsung JS9000 4K television and a Samsung BD-J7500 4K BD player. We are trying to hook them up and bypassing the sound thru our Yamaha 7:1 RX-V1800 amplifier. We have a beautiful picture but the only sound is from our television speakers. How do we get the sound to play through our Yamaha 7:1 amplifier? We are using all HDMI cables.