Example config for a dhcp client with a static address for Ubuntu 22.04 on a Raspberry Pi 4

This is an example config for the file located in: /etc/netplan/

network:
    ethernets:
        eth0:
          addresses:
            - "fd00::2/64"
          dhcp4: true
          dhcp6: true
          nameservers:
              addresses: ["2620:fe::fe",9.9.9.9]
          optional: true
    version: 2

Also you may need to change the system’s DHCP client search domain setting.
Please have a look here.