I was surprised the iPhone YouTube app didn't provide Picture in Picture support by default:
But this video has a lot of views and seems to show a simple way (basically go into settings and enable the feature).
However, when following the video's instructions, the option is not available in settings so it cannot be enabled.
The comments on the video indicate similar experiences.
Note
There is a short exchange in the comments which suggests YouTube Premium may be required, but then suggests that's not the issue (since people who have YT Premium also cannot access the feature):
I’m ... trying everything and can’t get it
You need youtube premium.
I have it