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.