Awhile back, I heard about a raspberry pi project called Pi-hole, which is basically a network-wide adblocker. The way it works is that when a page like an example speedtest.net has a lot of ads on its main page. Which speedtest.net asks the ad provider for the content to display, but what Pi-Hole does is it intercepts that and gives the page a blank answer then which the page will not show anything in the place of the ad, this, unfortunately, does not work on every ad, for example. Youtube ads, but it can block most webpage ads, and of course, you can whitelist or blacklist ad providers on the Pi-Hole admin page. I did have some issues figuring out how to setup Pi-Hole, so it will block ads on my main computer, but after a bit of googling around, I figured out how to change the DNS settings on my Linux computer. If you would want to do the same project and set it up here is a great tutorial I followed for installation. After I configured the DNS settings on my devices gave it a try, and these are the before and after pictures on speedtest.net:
Before:
After: