You can checked if WOL is enabled with ethtool
sudo ethtool enp4s0 | grep -i wake
Supports Wake-on: pumbg Wake-on: d
As you can see in my case wake-on its d (disabled)
Other possible values, the wake on can be triggered by p (PHY activity), u (unicast activity), m (multicast activity), b (broadcast activity), a (ARP activity), and g (magic packet activity).
The value g is required for WOL to work and we can change it with ethtool or NetworkManager.
Ethtool, the change it’s not reboot proof
sudo ethtool -s enp4s0 wol g
Network Manager, the change is reboot proof
sudo nmcli connection modify enp4s0 802-3-ethernet.wake-on-lan magic
sudo nmcli connection up enp4s0
After applying the setting you can check again with ethtool
sudo ethtool enp4s0 | grep -i wake
Supports Wake-on: pumbg Wake-on: g