To remember when you install some ubuntu based distro
rm -rf /etc/resolv.conf touch /etc/resolv.conf sed -i 's/^dns.*/dns=default/g' /usr/lib/NetworkManager/conf.d/10-dns-resolved.conf systemctl stop systemd-resolved && systemctl disable systemd-resolved
Tested on Kubuntu 22.04
Original post (to which all credits go)
https://ubuntuforums.org/showthread.php?t=2383575&p=13810143#post13810143