Note that this is valid for macOS up to the 10.14 version. Since macOS 10.15 this will won't work as the whole 32-bit libraries set got killed and Wine won't work here. However, the paid Crossover thing had developed a workaround that would get SMBX2 work
Also, the native macOS build of the PGE Project toolkit installed separately will work with SMBX2: after dropping the PGE directory from the DMG into Applications, open the "for_linux_and_macos" directory at SMBX2 directory in the Terminal, and run the "./install.sh" script, it will prepare and install the compatible config pack that will be pointed into the actual SMBX2 installation. [Note: if you do use PlayOnMac, please run the terminal from the Settings of the virtual environment directly, to make sure the proper Wine toolchain will be assigned].
Then, run the native version of PGE Editor and select the "SMBX2 Integration [Wine integration]" config pack. The thing will load all resources and will start the work. You can open levels and edit them here in a place. You also can run level tests directly, however, before to start you need to open the "Test -> LunaTester -> Wine settings..." menu and choose the compatible Wine configuration (if you had the PlayOnMac, please select the proper toolchain from it and try to run its settings. If it got working, you will be able to run the game then). So, after you changed the settings, try to start the level test from here. The game should start and work. So, the macOS natively built Editor is able to run and communicate with Wine-ran LunaTester easily. That I got possible since Spring 2020 when I majorly reworked the testing sub-system.