The network config for out-of-the-box Ubuntu server has been stable for 6 years. You need to modify netplan's config: /etc/netplan/*.yaml (default is 00-installer-config.yaml). This renders volatile systemd-networkd configs in /run/systemd/network which, in turn, will configure systemd-resolved appropriately.
If you've opted out of netplan, then you need to configure one of systemd-networkd or NetworkManager manually (on server, NetworkManager is only present if you've installed it).
I personally used to be opposed to netplan but I had to do some very esoteric network configuration which was super easy with netplan.