Hi Nay3,
Welcome to Apple Support Communities. If you are having issues with your AirPods playing while charging there are a few things you can do. First, check inside of the charging case for any dirt or debris that might be obstructing the contact between the case and the AirPods.
"Clean the charging case with a soft, dry, lint-free cloth. If necessary, you can slightly dampen the cloth with isopropyl alcohol. Allow the charging case to dry. Make sure not to get any liquid in the charging ports. Here are a few more guidelines:
- Remove any debris from the Lightning connector with a clean, dry, soft-bristled brush.
- Don't use abrasive materials to clean the charging case.
- To avoid damaging the metal contacts, don't put anything in the charging ports."
How to clean your AirPods, AirPods Pro, AirPods Max, and EarPods - Apple Support
We hope this helps.
Cheers!