Protective DNS, when set up with a DNS provider that blocks known ad / tracking domains, would help with that. NextDNS, Control-D, and Mullvad all offer this service, for example.
Protonvpn also blocks ads, trackers, malware. With some of my apps needing google play services, I get trackers block constantly on my grapheneos phone.