This will force your computer to use Google's DNS servers instead of your ISP's. If the issue goes away when you do this, then your ISP's DNS servers are doing something funky and there's not a lot ...
Since iOS 14, Apple has supported encrypted DNS, which in a nutshell makes it much harder for snoopers on the same Wi-Fi network as you to see the domain names of the websites you are visiting.
You can fix a "DNS Server Not Responding" error by resetting your internet connection and computer. If the error keeps appearing, you can also flush your DNS cache ...