Like just about any tech product, no pair of AirPods is completely immune to occasional wonkiness. This could be a failure to connect to a previously-paired phone, or a sudden inability to recharge, even when sat snugly in the charging case.
For issues like these, you can try resetting your AirPods, which may be able to fix the problem without needing a replacement or a trip to the repair shop.
It's a simple process, too. Here's how to reset your AirPods or AirPods Pro:
1. Put your AirPods in their charging case and close the lid.
2. Disconnect your AirPods from your iPhone under Settings > Bluetooth > AirPods > Forget this device.
3. Open the charging case lid.
4. Press the white button on the back of the charging case until the interior light starts flashing amber.
5. Hold the AirPods near the iPhone you want to pair them to and watch them magically reconnect.
For the AirPods Max, resetting is simply a matter of holding down the noise control button and digital crown until the status LED flashes amber.
You can also perform a full factory reset, which removes the AirPods Max from your iCloud account. To do this, hold down the noise control button and digital crown for 15 seconds, until the status LED flashes amber then white to confirm.