DIAGNOSIS That's coil whine from the internal electronics, a known issue with some units. It's not the speaker.
FIX Unplug the camera. Check the USB cable and power adapter for damage or debris. Plug it into a different wall outlet using a different, high-quality USB power adapter (like a phone charger). If the noise persists, the unit itself is defective.
IF THAT DIDN'T WORK The noise is likely a hardware flaw. Contact Ring Support directly. They are often aware of this issue for the Gen 2 Indoor Cam and may offer a replacement if it's under warranty.
HEADS UP Don't try to open the camera or clean it to fix this. You'll void the warranty and the sound is internal.