Ubuntu 18.04 changed how the network is configured

/etc/network/interfaces is gone in 18.04 and netplan is what reads the configuration now, which is a surprise best encountered before the reboot rather than after it.

# /etc/netplan/01-netcfg.yaml
network:
  version: 2
  ethernets:
    ens3:
      addresses: [203.0.113.10/24]
      gateway4: 203.0.113.1
      nameservers:
        addresses: [1.1.1.1, 9.9.9.9]

# $ netplan try      — applies, and reverts in 120s unless confirmed
# $ netplan apply

netplan try is the command that saves you: it applies the change and rolls back automatically if you do not confirm, which means a mistake in the address of a remote machine does not lock you out. YAML indentation errors are the main failure mode and they are reported reasonably well. The interface name is also likely to have changed from eth0 to a predictable name, so a configuration copied from a 16.04 host will parse correctly and configure nothing.