Is there any OS that can run
.app files except for macOS? For Example, an application like Xcode run on another OS? I've Heard about Something called Darwin, but I am not completely sure about it.
Is there an alternative to macOS that runs macOS .app files?
On a practical, useful and real level? Utterly no. There is no macOS equivalent of something like the Windows application runner Wine to run GUI applications like Xcode.
That said there is a hobby project called Darling that attempt to be a macOS version of Wine but as the homepage for that project states:
At this point, does not yet run macOS application with a GUI.
And also states on their project status page:
Developers may find Darling interesting as a playground to work on something extraordinary. There is a lot of work ahead of us, but not so much to have usable results.
Which means that tool is—no disrespect—effectively useless past tinkering since there are few to no macOS command line applications anyone really wants to run on a a non macOS system. If anything, Linux systems have a far richer world of more useful and well maintained CLI tools when compared to macOS.