YouTube has recently updated its app to support HDR for the iPhone 11 Pro Max and iPhone 11 Pro models. On the iOS, HDR is supported beginning with the iPhone X, but newer models require app updates.
To see the new HDR support, your iPhone 11 Pro Max or iPhone 11 Pro must have an updated YouTube app. You can check to see if the playback is on the highest quality by tapping the 3 dots at the top right part of the video to bring up the options, then choosing HDR on supported formats.
Aside from the iPhone 11 Pro Max and the iPhone 11 Pro, HDR should be available on devices that were released 2017 and beyond and have OLED screens. Sadly, this excludes the iPhone XR, the iPhone 11 and all iPad models.
Accessing YouTube via the Safari browser may not have HDR as an option, so it’s best to watch in the YouTube app.