It’s undergone a lot of changes but its roots are in Unix - from Wikipedia:
macOS (/ˌmækoʊˈɛs/; previously Mac OS X and later OS X) is a series of proprietary graphical operating systems developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple’s Mac computers. Within the market of desktop, laptop and home computers, and by web usage, it is the second most widely used desktop OS, after Microsoft Windows.
macOS is the direct successor to the classic Mac OS, the line of Macintosh operating systems with nine releases from 1984 to 1999. macOS adopted the Unix kernel and inherited technologies developed between 1985 and 1997 at NeXT, the company that Apple co-founder Steve Jobs created after leaving Apple in 1985. Releases from Mac OS X 10.5 Leopard and thereafter are UNIX 03 certified. Apple’s mobile operating system, iOS, has been considered a variant of macOS.
The first desktop version, Mac OS X 10.0, was released in March 2001, with its first update, 10.1, arriving later that year. The “X” in Mac OS X and OS X is the Roman numeral for the number 10 and is pronounced as such. The X was a prominent part of the operating system’s brand identity and marketing in its early years, but gradually receded in prominence since the release of Snow Leopard in 2009. Apple began naming its releases after big cats, which lasted until OS X 10.8 Mountain Lion. Since OS X 10.9 Mavericks, releases have been named after locations in California. Apple shortened the name to “OS X” in 2012 and then changed it to “macOS” in 2016, adopting the nomenclature that they were using for their other operating systems, iOS, watchOS, and tvOS. With Big Sur, Apple advanced the macOS major version number for the first time, changing it to 11 for Big Sur from the 10 used for all previous releases.
macOS has supported three major processor architectures. It first supported PowerPC-based Macs in 1999. Starting in 2006, with the Mac transition to Intel processors, it ran on Macs using Intel x86 processors. Most recently, starting in 2020, with the Mac transition to Apple Silicon, it runs on Macs using 64-bit ARM-based Apple Silicon processors.
I think an OS to compete with macOS will either emerge from similar Unix-y path, or something written in a language like Rust.
Maybe that’s just wishful thinking