The 2.2.*.* network segment belongs to Oracle America Inc; Google's public IPv4 DNS servers are 8.8.8.8 and 8.8.4.4.
Since you've told your router to use the pi-hole as a DNS server, it probably distributes that information to your network using DHCP.
To bypass that, you'll need to configure the Debian server to ignore DHCP-provided DNS server(s) and configure it to use something else. How to do that depends on how your server's IP configuration is managed.
With NetworkManager
If your installation includes a graphical desktop environment, it probably uses NetworkManager by default.
If you are using NetworkManager, you should start by finding out the connection name. You can do it with nmcli connection show and looking at the active connections (= those with the DEVICE field not blank, and usually listed in green). If this command produces just an error message, then you are probably not using NetworkManager and should skip this chapter.
Then you'd set that connection to ignore DHCP-specified DNS servers with:
nmcli connection modify "<your connection name>" ipv4.ignore-auto-dns yes
And then configure some custom DNS servers to use, e.g. Google's public DNS servers:
nmcli connection modify "<your connection name>" +ipv4.dns 8.8.8.8
nmcli connection modify "<your connection name>" +ipv4.dns 8.8.4.4
The final step is to refresh the connection to make the new settings active:
nmcli connection up "<your connection name>"
With ifupdown (i.e. with network settings in /etc/network/interfaces[.d] only)
This is the default method for minimal installations.
In this case, you have to configure the actual DHCP client utility to do the substitution. Usually in this case in Debian 12 or earlier, the DHCP client is dhclient and its configuration is at /etc/dhcp/dhclient.conf.
Add a line like this to /etc/dhcp/dhclient.conf to override the DHCP-assigned DNS servers with custom ones:
supersede domain-name-servers 8.8.8.8, 8.8.4.4;
To make the setting take effect, disable & re-enable your network connection using ifdown & ifup. Obviously it's best to be locally logged-in to the server when doing this, but specifying both commands on the same command line should work even over a SSH connection if there are no errors in configuration. For example, if your network interface is named eno1 and you're running as root:
ifdown eno1; ifup eno1
Debian 13
In a minimal installation of Debian 13, there is ifupdown, no NetworkManager, and the default DHCP client has been switched from dhclient to dhcpcd. To stop it from receiving DNS server addresses from DHCP, add the line
nohook resolv.conf
to its configuration file /etc/dhcpcd.conf. Then refresh the active configuration by disabling & re-enabling the interface, e.g. for interface eno1:
ifdown eno1; ifup eno1
After that, dhcpcd (or rather its hook script component /usr/lib/dhcpcd-hooks/20-resolv.conf) will no longer touch /etc/resolv.conf and you can add your preferred DNS server settings to it the classic way. For example:
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
echo "nameserver 8.8.4.4" >> /etc/resolv.conf
Other possibilities
Although the above might be the most common ways to handle network configurations in modern Debian, those are by no means the only possible options; for example, you might install an optional netplan, replace the default dhclient/dhcpcd DHCP client utility with something else, or even replace the whole thing with your own custom shell scripts if you had a reason to do so.
But the two variations listed above are probably the most common ones: NetworkManager is likely if the server has a desktop environment installed, and if you started with a minimal text-console installation, then you probably have the classic ifupdown.