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.
[1] - https://mimi.io/mimi-hearing-test-app