I would say to install the free Adguard DNS configuration profile, but only iOS has the capability of installing DNS configuration profiles. For Android you would need the paid app to do the same thing.
With that said, on Apple devices the config profile - a cryptographically signed internal proxy for all DNS requests, including any made directly by software where they bypass the system’s DNS - works absolutely spectacularly, missing only those ads that are retrieved from the same source as legitimate content.
So for example, in-app YouTube ads and Pinterest ads remain, because they are provided by the same API endpoints that serve up their content, meaning any DNS-based filtering cannot discriminate. But when I first installed it back in 2005 - shortly before I deleted the official Reddit app for it being the steaming pile of manure it was (and apparently still is) - I had ads in all sorts of apps suddenly vanishing, including all Reddit ads and promoted content