All x86 software being run on macOS relies on Rosetta 2. It effectively does a translation of x86 binaries to ARM binaries. Then, WINE handles the PE to mach-o translation along with providing a system call translation from Windows to *nix. Game porting toolkit then adds in macOS specific stuff as well as Vulkan and DirectX translation to Metal.