You can also install the app "X.app" from the app store and just use the Share menu inside the YouTube app to open videos in X.app without ads, then you can go fullscreen from there or activate PiP. You used to be able to do this with the Scriptable app and Shortcuts but it stopped working under iOS 15.