I doubt this works as @PA3DSS mentions.
I tried a lot to block YT using pi-hole but no success.
this issue is that the domain url is a little random so
rr1---sn-4g5ednds.googlevideo.com
infact is something like
rr1---sn-<random>.googlevideo.com
next to that, the add and the video always come from the same exact domain.
So you could block this and the list grows with no affect or you can't see the video.
I'm still looking for a working solution and I tried automatically listing, it's suggested multiple times, however it doesn't work.
I guess you could turn all that into a single regex blacklist entry, simplified to assume that this rr<something> is good enough to identify these subdomains as they come up:
^rr.*googlevideo\.com$
Most people report that domain blocking of YouTube ads no longer works. It's more likely to be possible at the browser level, using something like ABP or the Brave browser, but even that is very sketchy with mixed results. What does work is subscribing to YouTube Premium.