Apple has always shared the kernel of macOS after each major release. This kernel also runs on iOS devices as both macOS and iOS are built on the same foundation. This year, Apple also shared the most recent version of the kernel on GitHub. And you can also find ARM versions of the kernel for the first time.
But first, it’s time for some computer history. The first version of macOS (originally named Mac OS X) came out in 2001. It was built on top of NeXTSTEP, an operating system developed by NeXT. Steve Jobs founded NeXT in 1985 and sold the company back to Apple in 1997. And Apple decided to use NeXTSTEP as the foundation for Mac OS X.
NeXTSTEP itself is derived from open-source project BSD. That’s why the Mac you might be currently using relies heavily on open-source technologies. And that’s also why Apple releases a tiny, tiny portion of macOS every year. You can’t compile it and run your own version of macOS, but other kernel developers probably care about the source code of this kernel.