The phone has supported high dynamic range technology since launch, with wider colour gamut and contrast rich content being available from other services - such as Apple's own movie store. However, the YouTube app had previously only offered standard colour formats.
There are several sources to look for that are stored in HDR on YouTube, including a whole stack of videos on the dedicated HDR Channel.
You can check if your YouTube app has been updated already, and whether it is genuinely outputting HDR by tapping on the video, then the three dots symbol in the top right, and finally "Quality".
This will show all the resolutions available and should also show "HDR" next to each resolution choice.
Unfortunately, it seems that YouTube is yet to roll out HDR to its iPad apps. The latest Apple models support HDR but the app itself is yet to add the feature.
The latest Apple TV supports HDR too, although the YouTube app for that platform is even struggling to playback true 4K resolutions at present, claims MacRumors.