Warning
Use a sudo-capable account, keep shell history for audit, and back up critical paths before changing boot, SSH, or package state.
What you will achieve
Point Linux at reliable resolvers and confirm systemd-resolved is not fighting you.
1) Set DNS with NetworkManager (desktop)
nmcli connection show
nmcli connection modify "Wired connection 1" ipv4.dns "1.1.1.1 9.9.9.9" ipv4.ignore-auto-dns yes
nmcli connection up "Wired connection 1"
2) Or set resolved fallback DNS (server)
sudo nano /etc/systemd/resolved.conf
sudo systemctl restart systemd-resolved
3) Validate resolver
resolvectl status
getent hosts example.com