An ip address can be added to an interface using the ip addr add command:
sudo ip addr add <ip-address>/<prefix-length> dev <interface>
Example:
sudo ip addr add 192.168.10.1/24 dev ens18
where ens18 is the name of the network interface and 192.168.10.1 is the ip address and 24 is the prefix length, which corresponds to a network mask of 255.255.255.0.