how to configure a network interface on ubuntu server 22.04 lts?

I would like to configure the ethernet network interface of a server but I am completely lost. I saw on the internet that you could do it with the nmcli tool but also with netplan, I saw some people say that you had to modify configuration files but everyone was talking about different files.

I have so far added a static IP address to the server interface by editing the .yaml file located in /etc/netplan/ but now the interface has two IP addresses and I don’t understand why.

So I would like to know how it is advised on ubuntu 22.04 server to configure a network interface and why have I now two ip addresses?