Assuming it works the same way as on android you just start playing a video then switch out of the YouTube app without stopping playback. In fact I just read the Google help page “Using picture-in-picture on your mobile device” and it says exactly that for any mobile device and only goes into iPhone Vs android specific details when it comes to ensuring you’ve not turned off any default on settings that are required for it to work.
Assuming it works the same way as on android you just start playing a video then switch out of the YouTube app without stopping playback. In fact I just read the Google help page “Using picture-in-picture on your mobile device” and it says exactly that for any mobile device and only goes into iPhone Vs android specific details when it comes to ensuring you’ve not turned off any default on settings that are required for it to work.