Learn how to assign static IP address to Raspberry PI.
I am using Ubuntu 20.04 on a Raspberry PI in this video.

Command Used
1) List of network devices on the Raspberry PI
ip addr

2) Using nano as a text editor with sudo access
sudo nano XXX.yaml

3) Applying new changes to the Netplan yaml file (configuration file)
sudo netplan apply

4) Directory list
ls

5) Revision of the Linux OS.
lsb_release -a

6) Directory where the configuration file is stored.
cd /etc/netplan

This is the yaml file in the video.

network:
version: 2
renderer: networkd
ethernets:
eth0:
dhcp4: no
addresses: 192.168.50.89/24
gateway4: 192.168.50.1
nameservers:
addresses: [8.8.8.8,8.8.4.4]

Reference