I use AdAway - https://f-droid.org/packages/org.adaway/ on my Android phone. Downloads lists of advertising hostnames and blocks them via /etc/hosts. It's licensed under GPL-3.0. Requires you to have rooted your phone.
Just looked into how it works without root access. It apparently creates a local VPN interface and routes traffic through it. Which is a fine way of doing it, except it prevents you from using other VPNs on the same device at the same time - https://blokada.org/api/v3/content/en/help.html#howitworks - FWIW, this is also how Tor on Android (using Orbot) works for non-rooted devices (if you want to routes apps that don't have socks proxy support).
Just to clarify re "VPN", it's not actually a VPN to any third party service, it's just a local "fake" VPN interface to intercept traffic.
Hosts list. Doesn't work as well on mobile. Unsure how Waze does their ads, but on mobile you get a white box with "Couldn't load!" or something of that sort instead of no ad at all.