QUAD9 uses only filter lists, while NextDNS also has an option to use AI. When you use public malware lists, it depends on the list you are using as a source (Next also uses public lists only different ones than Quad9).
Quad9 outperforms Next when blocking C&C servers (it was also intended as free DNS for SME and Soho). NEXT does better when blocking Phishing, they are more or less equal when it comes to Malware blocking. Because the refresh/update frequencies impact the malware blocking performance, you might get different results when testing at different moments of the day using the same sources.
When you like to play and fine tune your DNS, there is no better free DNS than NEXT (with great reporting insights and lots of security and privacy options).When you are a set and forget type of user with privacy concerns (regarding DNS logs) there is no better free DNS than Quad9. When you are set and forget and don't care about DNS logs, there is no better DNS than your ISP. Availability of servers nearby may impact your decision (more or less time to resolve the IP address belonging to the domain name you are requesting).
DNS security internals itself Next is a little better than Quad9, but that is on rarely misused features (Quad is better than most free DNS services and Next is also better and on a few points best).
I was testing URL filters some time ago, then by accident I met a guy on a party who was a free Lance security consultant. Above is the recap of the info he provided me.
The guy himself used: default DNS at home (his ISP better performance IP TV and no hassle on mobile phones when abroad) and Next on his own laptop and Quad9 on his kids laptop (telling me he would not be able to resist looking what his teen kids were visiting when they were on Next, because they deserve their own privacy he had setup their laptops with Quad9). This shows IMO we are talking about inches of differences not yards or miles in protection differences. Writing this recap I realize he did not mention were he put his wife's devices on.