Linux is the foundation of a Magento 2 store. This is the operating system that Magento needs to run correctly. You can always look up the system requirements in the Magento DevDocs.
In the DevDocs we see that Magento does not support Microsoft Windows and macOS. It is possible to install Magento on these operating systems but you will see that you will run into issues. I highly recommend using Linux.