Show your global and per-link DNS settings in Debian/Ubuntu

resolvectl status
If you are using systemd version earlier than 239 use:
systemd-resolve --status
Also, the following command is helpful for troubleshooting DNS issues:
journalctl -u systemd-resolved -f