UntrackMe can be assigned as a default app and within it you can assign whatever app as default for YT (I think). Although it's not really designed for this so I'm not sure if it will do what you want exactly.
FOSS for Android
About
๐ค A community for sharing and promoting free / libre and open source software on the Android platform.
โจ This means software you are free to modify and distribute, such as applications licensed under the GNU General Public License, BSD license, MIT license, Apache license, etc. and software that isn't designed to restrict you in any way.
๐ฌ๐ป Think of free software as free as in freedom of speech, not free beer.
Rules
๐ฒ Must relate to Android
Your post must be related to the Android operating system.
๐ Mention Source License
When promoting applications, please mention the source license (GPL, MIT, etc.).
โจ๏ธ Link Source Code first
This again is about promoting applications. Please include a link to the source code of the application at the top. If the application is hosted on F-Droid, a single link to the F-Droid page is OK, as it includes all relevant information.
๐คก No Memes
Please refrain from posting memes in this community.
๐ฃ Promote your own
Software Developers may promote their own apps and updates. No prior confirmation with the mods is required.
๐ Other Resources
I cant seem to assign apps
I don't remember how I set it up, sorry. Maybe it's also more limited on newer android versions.
The app mpv-remote kinda does this. Although opening the link gives a error but i can open links in mpv by copy pasting. https://github.com/husudosu/mpv-remote-app