The pi hole doesn't by itself, but adding in ublock origin is typically enough to get the job done. I basically never see youtube ads outside of the sponsored sections and I guess I could use sponsor block for that
"Youtube requires a browser that supports Web Environment Integrity in order to provide you with the best quality in streaming content. Please upgrade to a browser supprting Web Environment Integrity. Chrome \ and Edge \ are our recommended browsers"
Or words to that effect. And it'll likely gradually become the same for most advert funded sites.
EDIT: Actually I don't think this will become a thing until it is hitting their bottom line. That is if enough people switch away from chromium based browsers. Just like it did for ad blockers.
These scumbag companies filled to the brim with more business degrees than ideas can go ahead and keep trying this shit, but I'm never playing ball. In fact, they've got me back into pirating when I had stopped for about a decade or more.
I dont use a pi hole (but am heavily considering setting one up).
Right now I use newsboat rss to "subscribe" to whoever I want. When it opens Librewolf browser, a redirect extension takes me to an invidious instance of my choosing, the NoScript extension blocks everything, but the url is all i really need.
I copy that url. I use yt-dlp to download video from invidious via my terminal emulator. Sponsorblock flags, give me captions flag, and if I'm willing to wait the extra time and give it the extra hard drive space, the best video flag. No ads, no sponsors, no JavaScript tracking me. Pure fuck marketers goodness.