How do I even start programming an os for a computer?

Like my problem isnt the coding part ill learn that but like. WHERE do I begin making it? how did they make mac OS? My problem is like idk where to start typing in my code
Update: My problem is not the coding. Its where to actually type in my code. I cant tell if I just type it into notepad or WHAT. thats what i need help with
9 answers 9