Clean your AirPods regularly.
Use cotton swabs to clean the earbud tips after each use.
Avoid putting your AirPods in your ears if they are wet or sweaty.
If you have a lot of earwax buildup, you may want to consider using a different type of earbud, such as over-the-ear headphones.
Read more: https://barcodelive.org/how-to-clean-earwax-from-airpods