If you want to stream YouTube videos in 4K you need:
Once a 4K video is selected, the PS4 Pro will automatically stream the content in 4K resolution.
If you want to make sure you’re streaming in 4K, in the You Tube app go to [Settings] > [Show Video Info] > [Enabled].
A 4K video normally has 3840 x 2160 resolution, so if you see these values, you are streaming in 4K quality.
Picture quality also depends on the video you are streaming.