To use on a modern Mac, you need to be using an "ULTRA" certified HDMI cable, not a generic one one that shipped in the box with a product.
M2 and better Macs with a DIRECT HDMI port CAN support higher refresh rates for 4K at 60Hz, but watch for transmission errors. if any occur, the refresh rate, and then the resolution, are reduced until the display is error-free.
HDMI cables you want for HDMI-only Displays (higher resolutions than 720p TV sets) are marked as Certified with an anti-counterfeiting tag and are labeled:
"Premium High Speed HDMI cable" or that + "with Ethernet" --OR--
"Ultra High Speed HDMI cable" or that + "48G"
Cables with No Certification tags are good for your standard 720p TV set, and not much more.
HDMI was invented for HD TV sets. it works great at its original resolution of 720i or 720p. At higher resolutions, it quickly develops issues that are complex to solve, and the cables and adapters required to solve are NOT intuitive.