This is a very similar to a question the other day:
Also see netplan/examples at main · canonical/netplan · GitHub