Probably mostly the GUI and some different set of system services / APIs. I think all of the OSes are the same XNU/Darwin base and then diverge dramatically in user space.
This is true to the best of our knowledge for their GUI-less OSes running on the HDMI adapter, T2 chips, and display chips as well.
They still package the kernel differently. It’s like Linux - you don’t compile in all the hardware support into one package - just the set of hardware it needs to support. And Apple has generally unified a lot of the HW architecture across their product line but there are always small differences here and there.
They also have RTKit (a RTOS as the name suggests) for simpler devices such as AirPods, AirTags and some dumber stuff.