Raspberry Pi OS – Install network manager

sudo apt update
sudo apt install network-manager network-manager-gnome openvpn openvpn-systemd-resolved network-manager-openvpn network-manager-openvpn-gnome
sudo apt purge openresolv dhcpcd5
sudo nano /etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile
dhcp=internal

[ifupdown]
managed=true

sudo nano /etc/nsswitch.conf
change this line
hosts: files mdns4_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns
to read
hosts: files dns mdns4_minimal [NOTFOUND=return] resolve [!UNAVAIL=return]
This is needed as DNS wont work at the command line otherwise

sudo reboot

Now go to the top of your screen and reconfigure the panel: open "Panel Settings" -> "Panel Applets": remove "Wireless & Wired Network". The network manager applet should appear after a reboot.