You can set a static IP by editing the /etc/netplan/50-cloud-init.yaml file and applying the changes using netplan apply.