To put YouTube videos in the corner of your iPhone screen, use the Picture-in-Picture (PiP) feature by enabling it in both your iPhone's Settings (General > Picture in Picture) and the YouTube app (Settings > General), then start a video and swipe up to go home, shrinking it to a movable corner window, though YouTube Premium may be needed outside the US or for music content.
To use picture-in-picture (PiP), exit the YouTube app while a video is playing. If you have the PiP setting turned on, the video will shrink into a PiP window. The PiP window can be dragged to different parts of the screen, allowing playback to continue on top of other apps.
Method 1: Use Built-In PiP Mode in Chrome
With the Miniplayer, you can continue to watch videos, including playlists and live streams, while you browse YouTube.
With Picture in Picture, you can watch a video or use FaceTime while you use other apps. in the video window. The video window scales down to a corner of your screen so you can see the Home Screen and open other apps.
Turning picture-in-picture ON
While watching a video, right click on the video and choose Miniplayer from the menu to get started.