While not black-magic, dealing with hardware and its quirks is a different skillset than writing React logic. A bug might need a reboot, or in some rare cases with terrible hardware, turning it into a paperweight.
In fact, I believe that learning to write low-level code for simple hardware (say, an Arduino or a RP2040), is a smoother path for a complete newbie than learning the massively complex frontend world, and provides much better foundational knowledge.
You're right, there's no magic here. It's just lots and lots of work. And there are important decisions to be made about how you design and abstract everything. None of them are hard, but making so many decisions is the very thing that's hard about most programming.
The answer of course is to have lots of programming experience. Which is why building an actual OS to the level of SerenityOS is not something a reasonably skilled graduate would be able to do.