Tested on Debian 12
There are several ways to set a DNS server in Debian. One way is using /etc/resolv.conf
. Therefore just add the following line with the DNS server you want to add to the file:
nameserver <ip-of-dns-server>
Sourced from ionos.de - Debian DNS Aendern