Some random dude in a video says so and that's it?Mine base Mac Mini M4 16GB was buzzing as soon as any display was connected, either to HDMI or via USB-C. Tried different cables, different power outlets, no way to fix it. Yes it was buzzing when turned off but connected to outlet too. My desk is pretty flimsy Ikea desk so i literally felt vibrations on desk. I have very quiet room and honestly couldnt stand it, my desktop full tower PC is more quiet. I returned it.
I watched teardown video and dude said that power supply components in Mac Mini M4 are low quality, everyone is using japanese components but not Apple in Mac Mini, i suspect this is power supply shielding noise or something.
Someone posted this on reddit:
"At first I thought it was the fan but then realised it's coming from the power supply which is on the top of the dice if you rest your hand on it, it stops because it's vibrating."
It is indeed true, if you put a hand on top of it and press, it stops buzzing. Must be bad quality coils.
I'd check your HDMI cable and your monitor. I read that some devices are not earthed, or not earthed properly, and so when HDMI is connected it is earthing via that instead, and is causing the buzzing.
I'm in the UK (230V AC) connecting to a Samsung TV with an Amazon Basics $5 HDMI cable, and no issues whatsoever.
Europe (depends on the country) has some shoddy AC wiring, and this could be the problem (bad earth).