Do not edit /etc/resolv.conf. It will likely be replaced by NetworkManager.

Open a shell and add nameserver for existing connection.

1
nmcli con mod $ssid ipv4.dns "1.1.1.1 1.0.0.1"

The SSID can be found with nmcli con.

Replace the IP addresses to your desired ones.

Now restart the connection to apply the changes.

1
2
nmcli con down $ssid
nmcli con up $ssid 

Verify with cat /etc/resolv.conf.