I plugged my iPhone SE into an amplifier and turned the iPhone's volume to maximum to get the best sound-to-noise ratio.

The health app says that my noise exposure was "Loud".

Did the health app measure the actual sound level or was it basing its warning only on the volume level?