Simple Question: how to set metrics and static IPs in Ubuntu Server

On Debian, I have typically changed
/etc/network/interfaces.d/eth0
to read
allow-hotplug eth0
#iface eth0 inet dhcp
iface eth0 inet static

and then edited
/etc/dhcpcd.conf
to end with something like
interface wlan0
metric 303
interface eth0
static ip_address=192.168.1.50/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1
metric 202
interface eth1
metric 201

How may I do something similar in Ubuntu Server?

Since bionic networking in Ubuntu is netplan

https://netplan.io/examples