Mac OS came from Mach, an open source microkernel from CMU in the 80s. Although Objective-C was originally proprietary, NeXT implemented it on GCC and open sourced it.
The origin of modern MacOS/iOS is definitely open source.
The origin of modern MacOS/iOS is definitely open source.
I believe you mean OS X, not MacOS.
Apple could switch OS X to entirely proprietary underpinnings and few customers would even notice. In fact, OpenStep ran just fine on top of NT. [And also on top of then-non-open Solaris].
Apple confusingly renamed OS X to MacOS a few years ago.