I think either is fine but it depends on what you want. Quad9 is free and can offer encrypted DNS and malware blocking but that is about it.
NextDNS offers a lot more options but at a small fee. If you are having trouble with it not working, try to make sure you have everything else that might also try to manage a network connection disabled first. Like another on-device DNS filtering service. Also if possible use the app for your device instead of the manual setup/profile method. I had some trouble with NextDNS iOS profiles but easily got it to work via the app which essentially automates that process.
Supposedly the config file and app should work the same way but I personally just find the app easier. Also easier to toggle on/off for trouble shooting. Your mileage may very depending on what you are setting up on the NextDNS side and what OS/devices you use.