Both the iPhone XS and XS Max, like the iPhone X, feature "Super Retina" HDR displays that support HDR videos. HDR videos offer up a broader range of colors and luminance compared to non-HDR content.
When watching HDR videos on YouTube, to ensure you're watching at the highest possible quality, you can tap on the three dots in the top right hand corner and then select the "Quality" option. HDR listings will only be available on devices that support HDR, and the highest available quality on the iPhone XS and XS Max is 1080p60 HDR.
Apple added HDR support for the iPhone X back in May, but the feature was not originally working with the iPhone XS and XS Max until the latest update.