What could be causing my APCs to buzz from time to time, and for my Tesla to stop charging?
This could be due to many reasons and by inspecting the cause of each possibility you may troubleshoot the problem depending on your context:

Brownouts:

high electricity demand even temporarily like a start-up of heavy equipments.
related in some cases to the weather condition. Try to correlate the timing.
construction project or civil works in the neighborhood.
malfunction of a smart meter (if applicable).


Frequency or voltage fluctuation:

a ups can switch to bypass mode on voltage or frequency fluctuations.
some ups have a switch to select between narrow or wide frequency tolerance.


Harmonics:

a ups at the same time creates harmonics (charger) and is vulnerable to harmonics making it switching to bypass.
harmonics can be created by any nonlinear equipment. Do not underestimate small machines in inspecting this cause like lighting dimmers (especially dimmers), battery chargers, ...
elevators are double suspects: heavy start-up and harmonics creators.


Electrical installation problem:

Sometime loose connections may be a source of trouble creating resistance in the circuit and they are dangerous on the safety level since they may cause fire.
wires dimensioning and simultaneity issues