From what I heard MacOS is a pretty decent operating system. Isn't iOS based off of it?
Yes and no.
The core of macOS (formerly OS X) has wisely evolved over time. There was both a 32 bit to 64 bit transition and a platform transition that cause next to no disruption for the end user. In fact, all the different platform versions can be hidden behind a single binary file from the user's perspective. It is straight forward for Apple to also include additional platform support as necessary. Random factoid here, while the PowerPC 970 was a 64 bit chip and ran 64 bit applications, the kernel for OS X 10.5 was only 32 bit but used a PAE-like scheme to support up to 32 GB of memory in real kernel mode. 64 bit PowerPC applications did manage to see the full 64 bit address space and larger 64 bit general purpose registers while using the 32 bit kernel. Apple designed OS X this way dating back to OS X 10.0 as all signs on the horizon pointed toward a 64 bit transition less than a decade away.
Design software right the first time taking into considering future trends. With this credo Apple will add some hidden new features for internal Apple usage before opening them up for general developers. This also means knowing how to hide a few mistakes Apple has made during the development of OS X. The kernel itself is a prime example. Apple inherited it from NeXTstep which itself inherited it from BSD. The last few years since Apple has made the 64 bit kernel the default, kernel extensions have been relegated behind a kernel interface API. This is ultimately a step toward Apple replacing the mach kernel with an alternative if they should choose to do so (for awhile it seems that Apple was flirting with L4).
Another big thing Apple has done with OS X development is planned depreciation of legacy APIs. Carbon is the most notable example which lead the Photoshop, often seen as a flagship Mac application, to ship its 64 bit version on Windows before OS X. Adobe's first attempt of a 64 bit Mac Photoshop used 64 bit Carbon APIs before Apple decided to not ship them OS X 10.5. Older APIs for graphics were also replaced with CoreImage with then spawned CoreAudio, CoreVideo and CoreAnimation to make developer's lives easier. It is my understanding that some the legacy APIs live on today as merely software shims that sit above these newer, more modern APIs.
The one area where Apple hasn't seen long term trends correctly is with their OpenGL and Vulkan support. Apple certainly lags behind in official OpenGL support (4.5 current vs. 4.1 from Apple) though vendor extensions make up for a good chunk of support. Apple should still update to remove reliance on those vendor extensions. Vulkan support does need to be added to gain feature parity with the other big name OS on the market. I'm actually surprised that it wasn't mentioned for macOS 10.12. Though Apple does have Metal and adding Vulkan support to macOS doesn't seem to mesh well with recent reports of how Apple is de-empahsizing the Mac internally.
Probably something that Apple should have dropped a long time ago has been its file system: HFS+. The initial release of HFS+ was 20 years ago and was designed around the concept of spinning discs. Well limitations of HFS+ clearly show its age as features have been bolted on with limited success (case sensitivity technically works but legacy applications hate it). Apple's first attempt to replace it was with ZFS but then Sun bought Oracle and Apple got cold feet as Oracle is one of the few companies whose legal department is larger than Apple's (or it was at the time). Basic ZFS support was put into OS X 10.6 for developers but it went no where. mac OS 10.12 has introduced a new file system based around the concept of SSDs with optimizations for NVMe enabled drives. This shows some real performance and reliability potential though it is still years away from becoming the default on Macs (Apple could get away with introducing it on iOS devices sooner rather than later due to a much more narrow scope of support).
Nowadays, macOS is a pretty well polished product that continues to evolved. With the current yearly update pace for features, it does make each revision seem smaller than the last but when looking at the aggregate whole over a decade they have changed a lot.