Will Samsung EVO 860 work if WD green work on my laptop?

It sounds like your laptop is the 2017 model, in which case from a quick bit of googling, it looks like this only supports M.2 SSDs, not NVMe. You can quickly confirm this by looking at what PCIe version is supported, and what your link speed is.

You can use HWINFO64, then expand Bus, expand PCI Bus #0, highlight PCI Express Root Port, from looking around, it should be an Intel chipset, might be number #5, either way you'll notice it!

If that is the case, then you should be fine ideally to buy any M.2 SSD. It'll go at SATA speeds but it'll still be a hefty storage upgrade.

In my own personal experiences. I'm not aware of any storage restrictions that would be in action. Especially not 512gb. At the end of the day, the port does not care about the capacity of the drive. Acer has just told you what their system can be configured up to.

You should be able to easily install an M.2 SSD of any capacity in that slot.