sudo nmcli connection modify <connection name> ipv4.dns "1.1.1.1 8.8.8.8"

Apply changes:

sudo nmcli dev reapply <interface>