Dell U2518D Monitor flickers to black
Received a new Dell U2518D monitor from my friend who previously used it with their Windows computer.
I've got it set up to connect to my iMac through a HDMI to USB C cable, but it frequently fades to black for a few seconds at random, which is obviously annoying. This cable previously worked fine with a previous monitor so I don't think that's the issue, and I've also confirmed multiple times that the cable is securely plugged in at both ends.
What can I do?
iMac 27″, macOS 12.1