Mine did this yesterday. I literally had to repeat the process that I am going to copy/paste below you about 5 times. Eventually the AirPods did some sort of "hard reset" that I have never seen and they even went back to the factory-set name of just "AirPods Pro" when I had named them prior to that.
Try this below again and again until it works. Both with the AirPods inside and outside of the case. They seemed to start working after trying this 4-5 times and then letting them charge and then doing it again...
Here:
Try a full re-pair, reset, and try again.
Start with Unpairing/"Forgetting" the Device:
Settings > Bluetooth > Airpods > Forget this device. Confirm it.
Put both Airpods in their case, charge them via Lightning for a few minutes (or preferably until the case is 100%). Unplug them. Open the case and hold the button on the back of the case for 15+ seconds or until the light flashes white. Hold them near your iPhone and see if the pairing screen comes up and pair them. If not, repeat until it does. But if you can't see the screen pop up, then manually pair within Bluetooth.
If it doesn't work, open a case with Apple Support here: https://support.apple.com/airpods
Also please let me know the Firmware Version if it doesn't work:
Settings > General > About > AirPods > Firmware Version