Pi-hole is a great software to block DNS resolution based on curated ad- and malware-blocklists. I use it since many years and it has been a rock solid companion.
However key for using Pi-hole efficiently are the right ad- and malware blocklists. It blocks up to 30% of the DNS requests in our household which is quite significant. Almost all of them are ad related.
Below is what I use:
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/master/SmartTV.txt https://adaway.org/hosts.txt https://v.firebog.net/hosts/Easylist.txt https://v.firebog.net/hosts/AdguardDNS.txt https://v.firebog.net/hosts/Prigent-Ads.txt https://www.github.developerdan.com/hosts/lists/ads-and-tracking-extended.txt
https://urlhaus.abuse.ch/downloads/hostfile/ https://blocklistproject.github.io/Lists/alt-version/malware-nl.txt https://dbl.oisd.nl/
These lists have worked well so far and it is only occasionally required to explicitly whitelist certain hosts. The ad block lists are rather aggressive but effective.
Keep in mind though that Pi-hole only catches DNS resolution requests. It doesn't prevent direct connections on the IP layer. Also it can't prevent circumvention by Apps that use different DNS servers or DoH. It is just one layer of security and privacy.