The names you type in your browser or whatever you do to hit another machine by name and the corresponding IP addresses are cached locally. When you change your DNS, you want the cache to be cleared. Here is the command you can use on Linux Mint to clear the cache.
sudo systemd-resolve --flush-caches
Once that’s done, it goes out to your ISP to get the names resolved again.