Before you build it in Unity you have to select the target platform in the build menu. At the moment you have Windows most likely because you have a Windows PC. Select MacOS (or Linux). If that is not there then you have to download the appropriate editor first.
If it says nothing other than Windows download the MacOS/Linux... Editor and restart Unity: