There’s an ongoing bug with Space A40 earbuds where the earbuds can sometimes make an extremely loud, high-pitched screeching noise. It’s been reported before on this forum as well as on Reddit. It’s loud enough to cause hearing damage, making them potentially dangerous to wear. It’s loud enough to be heard by someone else 10 feet away.
It sounds like some sort of mic-speaker feedback loop. There’s a potential firmware fix for this (limiting the max sound output or preventing the loop in the first place). Without an update, I’m not sure what other solutions exist.