Hopefully you still have the receipt, if it has been a short while since you have owned them, I'm sure they will do an exchange. Just ask them nicely and I don't think it will be a problem.
have you tried resetting the airpods? https://youtu.be/JHpwP30ixEg
You need to make an appointment with Apple store for service
Thanks! Your answer is awaiting moderation.