YouTube has enabled HDR support on the iPhone XS and the iPhone XS Max. The change was noticed by users after the most recent YouTube app update, although the app's change log doesn't actually mention anything related to this addition.
Previously, HDR was only available on the iPhone X on iOS. The iPhone X, iPhone XS and the iPhone XS Max are the only iOS devices with HDR support in software as well as hardware, although there are other iOS devices such as the iPhone 8, iPhone 8 Plus, iPhone XR, and select iPad Pro models that support HDR in software. None of these devices, however, are getting this update.
If you own one of the aforementioned devices, you will see HDR written next to the resolution in the resolution list while playing an HDR video, such as the one below.
An HDR video has extended dynamic range, higher peak brightness and wider color gamut compared to standard video. It requires support on both, hardware and software level although some devices do fake it using software.
The YouTube app continues to not support resolutions higher than 1080p on iOS. Google currently only offers higher resolution options in its own VP9 video codec, which is not supported on Apple devices. Google previously did offer resolutions up to 4K in the more widely supported H.264 codec but eventually stopped, likely for competitive reasons.