Sounds like there is a loose wire in the ear speakers. I believe you’ll need to do some wire stripping and soldering to reconnect any loose wires.
What you should do is to isolate the problem. Is it an intermittent fault? Is it both sides? Is it one side? Does the problem happen when the headset is tilted or the headphone wire pulled a certain direction?
You’ll need to carefully disassemble the headset and look for the loose wires.
Here’s a YouTube video that will help guide you how to fix it: https://youtu.be/wYH1KZ_14uE
If you don’t have any soldering experience, ask a friend or adult for help. If you didn’t pay a lot of money for the headset, it might be best to buy new ones or find another pair. Good luck!