A server with a second network port that is usually unplugged can sit and wait for it at every start. Netplan has a one line answer for that.
By default an interface is treated as required for boot. Mark the unreliable one as optional:
network:
version: 2
ethernets:
enp3s0:
dhcp4: true
enp4s0:
dhcp4: true
optional: true
Here enp3s0 is the cable I care about and enp4s0 is the spare. The docs put it plainly: an optional device is not required for booting. The port is still configured, and it comes up whenever a cable shows up.
Test the file and apply it:
sudo netplan generate
sudo netplan apply
This also helps with a USB network adapter that you only plug in now and then, or a link to a test network that is switched off half the week.
Do not put it on the interface your services need. If something mounts a network share during startup and the only path to it is marked optional, the mount may run before the link is ready. Keep the setting for ports you can live without.
Further reading: Netplan YAML reference