It’s all just standard *nix software that will work on anything from my SFP module running openwrt, to a reflashed MIPS Ubiquiti router, to my x86 FreeBSD box.
Pi Hole was started specifically as a project targeting the Pi. It wasn't the first to do ad blocking DNS by a long shot, but it did marry a nice web UI to DNS and made it a lot more accessible. Nowadays I think there are much better options like AdGuard that do the same thing, but "running PiHole on a Pi" is a tangible thing to do with the RasPi you got as a gift and is an approachable project for a lot of Linux beginners with real benefits. You can find a million people on YouTube recommending exactly that, and walking you through how to do it step-by-step on a RasPi. Lot of people who are interested in tech but not so skilled probably don't have dedicated servers or know how to set one up, and I expect PiHole on a RasPi gets a lot of momentum from that as something cool and actually useful to do that isn't actually difficult/there are a million tutorials for.
Tl;dr is I agree with you, there are clearly technically superior options. But for a lot of the people you're referring to the alternative is not to run something better on a dedicated server/router, it's to do nothing at all and go back to using the router from your ISP.
I've seen AdGuard recommended a lot recently but from what I can tell this doesn't do the same thing as a DHCP pihole.
Something I'd love to do some day is replace my consumer router with something open source and run an all-in-one solution (ad blocking for all devices on network, DoH, as well as just a generally competent home router for a small apartment). Do you have any recommendations for where to start if I were to go down this road?
More powerful options are projects like PfSense or Opnsense, but those require more expensive hardware and for most uses you probably also need a separate switch. I personally use PfSense and find it relatively easy to use while being extremely powerful, absolutely jam packed with features but an accessible WebUI and clear documentation.
Probably the best all round option are the semi open, prosumer-ish products from companies like Ubiquiti or gl.inet (the latter is even based on OpenWRT, but with a nicer UI... I have one of their routers as a travel router). Ubiquiti's Unifi routers are very easy to use and jam packed with features for a pretty great price, but their platform is not truly open source. Still, gl.inet or Unifi are what I would probably most recommend to someone like you looking to upgrade but feeling overwhelmed by lack of knowledge.
Beware it's fun to tinker and that's how I learnd pretty much everything I know about networking, but breaking the Internet will not endear your new toys to your family. It's good to have a spare in case you mess up so you can keep the bits flowing while you undo your mistake. Anything you choose is going to be an ongoing learning experience if you're starting from no knowledge, but there are lots of high quality tutorials on places like YouTube.
So does any non-trash router.