On Android, you can use ReVanced [1] to patch the YouTube app (and much more) on your own device. It's safer than looking for "modded APKs" online as you can see the source of the patches you apply to your own app [2]
It is not 100% reliable as YouTube are continually finding new ways to block third-party apps, but NewPipe is never far behind. It has some features that the official app lacks, too! The only thing I ever miss with it is Chromecast support, which can't be added as it currently requires a proprietary library.
[1] https://revanced.app/
[2] https://github.com/revanced/revanced-patches/