Not really, you can use DNS to point YouTube.com to an iP you control, but the problem is that you will get TLS issues. It won’t redirect the hostname, but just the IP address. You could use a custom CA and sign YouTube.com certificates, but you will likely still have problems if you use Chrome because they will be pinning certificates for Google services, and your mobile applications will also pin the certs so your mobile YouTube will stop working completely.
Honestly, all applications are vulnerable AF, especially the open source projects without a major team behind them. I work in a security research team and we find critical bugs like this in a weekly basis. Even in major projects which you would be scared to know about. I personally wouldn’t expose anything except SSH or a VPN, or if I have to expose a web app, it’s going inside a VLAN with very restrictive firewall rules, proper logging, and a reverse proxy enforcing authentication via an OIDC based IDP.
We generally spend a couple of days to a week before finding something critical allowing RCE.