There was a free app that I used to do this for my father before. Mimi hearing test. They are just bringing this same function to the device by default.
Pretty sure you can do the entire thing with existing functionality on the existing airpods and iphone.
This is helpful even if you don't need a full-on hearing aid. My hearing is worse in the left ear than the right, so with headphones audio will sometimes sound panned right. The audiogram helps correct for that.
Yes, essentially you attached the audiogram in accessibility as others have referenced. It’s systemwide and works across many different types of AirPods not just the airpods pro 2.
Mimi hearing test app[1] works for that as it gives you an audiogram that you can import in Settings -> Accessibility -> Audio & Visual -> Headphone Accommodations -> Audiogram
I just downloaded and tried it for iPhone. Fwiw once you do the hearing test, on the app homepage you can sync to Apple Health and it sends over the audiogram.
Pretty sure you can do the entire thing with existing functionality on the existing airpods and iphone.