People go onto websites and connect to a DNS just to get into the website you're trying to go to, for example, IoTGadgets may have an IP address like 182.186.1.00. But what if the IP changes and your computer has saved it locally to save time? Here's how to reset it.
To reset the DNS cache on Mac OS Catalina or Mojave, do these steps
After that press enter, then put in your password in and press enter.
Next it will say macOS DNS cache reset, meaning that it will remove all saved IP's for websites.
Doing this may slow down the load of websites for the first time, but next it will load faster.
Sometimes a website may change its IP address, that website being something that you've visited multiple times. When the IP address changes, you may have to flush the DNS cache and try again. This will force the computer to reconnect to the DNS server and connect to the new website IP address.