pihole is a glorified /etc/hosts blocklist.
You need separate hardware, it will then act as a DNS server (more or less).
This is an advanced topic, and before you ask further questions I have to ask you to do some research on
DNS (domain name system & resolution) and
adblocking through HOSTS.
Personally, I think you should first solve the issues from
your other thread before taking any further steps.
And I'll say it again: There's no One-Click solution to this, even if you buy a raspberry pi.
You must be willing to accept less convenience and read some documentation.