As others have said, “just” your DNS requests go to the software. A raspberry pi will in practice possible slower than using a fast public DNS server right away (if not cached, generally faster afterwards), but you more than recoup the speed gains by fetching less ‘junk/ads’ from the internet.
That said, if you don’t have anything yet, check out AdGuard Home. This is a good (in my opinion better) alternative to pi-hole. (It natively supports DoH, TLS certificates without having to hack into config files, etc) swallows Adblock syntax (more efficient blocklists), etc, etc, etc)
–