Moving mouse around makes the mac hum or buzz
I found that using a Logitech G502 with my Mac Mini 2018 model was causing a slight humming / buzzing sound depending on the DPI I was using. It could be loud or low but allows when moving the mouse. If it stood still, nothing was happening (thankfully). I read someone else had an experience quite similar and they switched out the mouse. In my case, I did not want to lose my mouse.
What I found is in the Logitech Gaming Software Pointer Settings for a Profile a "report rate" set of radio buttons can be selected. Having the rate up between 1000 and 500 lead to loud humming, but once I selected 250 or less, the hum / buzz dissipated.
Hopefully others can find a similar solution to their problems.