Sure, but that’s more complicated and requires some device that you can always leave on. I run one myself, but NextDNS is a quick and easy solution and it works on a VPN. You can also make your Pi-Hole work behind a VPN but it’s much more work, NextDNS always works, no matter where I am and on what network.