While the default DNS server configuration is in /etc/resolv.conf, systemd and possibly other services may adjust this file. Changes to /etc/resolv.conf work immediately, but may be overwritten after reboot.
vi /etc/resolv.conf
To permanently change the dns configuration, edit /etc/resolvconf/resolv.conf.d/head instead and reload services or restart the system.
vi /etc/resolvconf/resolv.conf.d/head
https://www.tecmint.com/set-permanent-dns-nameservers-in-ubuntu-debian/