netplan apply does not change the IP address

Netplan is fussy about how .yaml files are formatted. Don't try to "pretty-fy" them.

Is 50-cloud-init.yaml the only .yaml file in /etc/netplan?

So edit your .yaml file to look like this...

network:
  version: 2 
  renderer: networkd                   # note the correct spelling
  ethernets:
    enp0s3:                            # identify the proper interface
      addresses: [10.0.2.100/24]
      gateway4: 10.0.2.1
      nameservers:
        addresses: [10.0.2.100]        # this is probably the wrong address
        addresses: [8.8.8.8, 8.8.4.4]  # use something like this instead

then do:

sudo netplan generate          # generate the config files
sudo netplan apply             # apply the new configuration
reboot                         # reboot the computer

and recheck your ifconfig output.

Note: if it was me, I'd let NetworkManager manage this interface, and set the static address information into the "Wired Connection" profile.

network:
  version: 2
  renderer: NetworkManager

then do:

sudo netplan generate          # generate the config files
sudo netplan apply             # apply the new configuration
reboot                         # reboot the computer

Hi I have experienced the same issue working with ubuntu 18.04 .The config file aplies the changes good for dhcp interfaces and for static ip´s I had to do first as a root (or whith sudo if not) this steps

  1. ip link set enp0s(x) down
  2. ip addr add x.x.x.x/x.x.x.x dev enp0s(x).
  3. ip link set enp0s(x) up
  4. and then configure the same interface with same values at /etc/netplan/*.yaml

I think the steps are in this order but I´m not sure, but of course you must up and down the interface and config the interface with both ip addr and the netplan config file. After some attemps that worked for me and after reboot everything continues working, I didn´t lose any config value