Might also need to check what the ports on your monitor support. A high quality DisplayPort cable will probably solve the issue, but make check the spec on the HDMI and DisplayPorts on your monitor to make sure they can support higher the higher bandwidth needed for high refresh rate/high resolution monitors. If your HDMI is only v1.4, but DP is 1.2 or 1.4, definitely use DisplayPort instead.
If you just used an old cable that came with something for free, I would buy a proper cable that supports the newer DP or HDMI specs from someone like KableDirekt.
Ah yes, let’s create more work for 90% of people because of the 10% who have to do more work anyway.