Set Google DNS servers for NetworkManager in Debian

Set them for "Wired connection 1", adjust if you have another name or wireless connection:

nmcli con mod "Wired connection 1" ipv6.ignore-auto-dns yes
nmcli con mod "Wired connection 1" ipv4.ignore-auto-dns yes
nmcli con mod "Wired connection 1" ipv4.dns "8.8.8.8 8.8.4.4"
nmcli con mod "Wired connection 1" ipv6.dns "2001:4860:4860::8888 2001:4860:4860::8844"
And restart NetworkManager:
sudo systemctl restart NetworkManager