In iOS 14 you can use the Picture in Picture feature pretty much anywhere, as long as the video provider allows it. And in this case, youtube does not..
So here is the workaround for it.
Hope you enjoy.
Links you need:
https://apps.apple.com/us/app/scripta...
Shortcut:
https://shortcutsgallery.com/shortcut...