open this file
$ sudo nano /etc/resolv.conf
Remove the IP address created by NetworkManager and add the follow line (I am add the 18.104.22.168 address to here.)
Save and exit, then run follow command for NetworkManager does not override the file
$ sudo chattr +i /etc/resolv.conf
If you want edit the file type
sudo chattr -i /etc/resolv.conf and add your configuration, finally retype
chattr +i command.