The simplest approach is to use a hosts file: https://someonewhocares.org/hosts/

That doesn't work the same as pihole. PiHole blocks ads on ALL devices on your network. Your computer, your laptop, your phone, your kids kindle, etc. As long as they are on your network, they are protected (and browsing web pages on an older phone, things are much faster)

Yup, that's a downside. The advantage is that it's much simpler and will also work when you're not on your home network.

How do I edit the hosts file on my iPhone?

I use AdBlock https://www.adblockios.com on iOS which runs a local DNS server that can blackhole domains. It doesn't work well on very large host files so I gave up trying to import https://github.com/StevenBlack/hosts, but it does work well for smaller lists.