Below one is a useful one.
It queries whatever DNS server IP for its version and can be run on Linux, Windows or MacOS:
pi@noads:~ $ nslookup -type=txt -class=chaos version.bind 10.0.0.2
Server: 10.0.0.2
Address: 10.0.0.2#53
version.bind text = "dnsmasq-pi-hole-2.80"
Or Quad9 public DNS 9.9.9.9:
pi@noads:~ $ nslookup -type=txt -class=chaos version.bind 9.9.9.9
Server: 9.9.9.9
Address: 9.9.9.9#53
Non-authoritative answer:
version.bind text = "Q9-P-5.2"
Not all DNS server software will reply or they are blocked displaying version for security reasons.
And check for below or similar setting on your router: