Job for wg-quick@wg0.service failed because the control process exited with error code.
See "systemctl status wg-quick@wg0.service" and "journalctl -xe" for details.
Created symlink /etc/systemd/system/multi-user.target.wants/wg-quick@wg0.service → /lib/systemd/system/wg-quick@.service.
Jul 10 10:39:26 hostname systemd[1]: Starting WireGuard via wg-quick(8) for wg0...
Jul 19 10:39:26 hostname wg-quick[6156]: [#] ip link add wg0 type wireguard
Jul 10 10:39:26 hostname -01 wg-quick[6156]: RTNETLINK answers: Operation not supported
Jul 10 10:39:26 hostname -01 wg-quick[6156]: Unable to access interface: Protocol not supported
Jul 10 10:39:26 hostname wg-quick[6156]: [#] ip link delete dev wg0
Jul 10 10:39:26 hostname wg-quick[6156]: Cannot find device "wg0"
Jul 10 10:39:26 hostname : wg-quick@wg0.service: Main process exited, code=exited, sta
Jul 10 10:39:26 hostname: wg-quick@wg0.service: Failed with result 'exit-code'.
Jul 10 10:39:26 hostname Failed to start WireGuard via wg-quick(8) for wg0.
The script fails at debian 10.
The fix:
apt install linux-headers-$(uname -r) wireguard-dkms wireguard-tools
After installing them and restarting wg-quick service for wg0. It works flawlessly.