NextDNS is a great way to block ads systemwide on your phone, since it blocks them at the domain level
NextDNS is a great way to block ads systemwide on your phone, since it blocks them at the domain level
Adguard home or pihole are also great for that in your home network, and Adguard dns for general use.
I don't know if nextdns is opensource, I think the server part is closed, the above mentioned are fully opensource.