If your router is your DNS, you may not want to do this, but reboot the router or edit its DNS settings instead. You can find this out with:
$ cat /etc/resolv.conf
System | Command |
---|---|
Systemd / Networkd DNS-Flush | # resolvectl flush-caches |
Network-Manager DNS-Flush | # nmcli general reload dns-full |