For networking setup on ubuntu server it uses a setup known as netplan there will be a file setup in /etc/netplan by the installer on my system it was named 00-installer-config.yaml

Edit this file to change network setup then you can do sudo netplan try to change to that netplan. It will pause after setting up the new network and give you a chance to restore the old setup. On my server the file looks like this

# This is the network config written by 'subiquity'
network:
  version: 2
  renderer: networkd
  ethernets:
    enp7s0:
      addresses:
        - 192.168.0.15/24
      routes:
        - to: default
          via: 192.168.0.1
      nameservers:
        addresses:
          - 8.8.8.8
          - 1.1.1.1
      dhcp4: false
  wifis:
    wlp6s0:
      access-points:
        NETGEAR12:
          password: silkyapple621
      dhcp4: true

In this netplan file i have my ethernet adapter named enp7s0 setup with a static ip address Also the wifi adapter wlp6s0 is setup to use dhcp to have an ip address auto assigned by the router.

To learn more about networking on ubuntu server check out https://ubuntu.com/server/docs/explanation/networking/configuring-networks/#configuring-networks