There were formal schools in Egypt, but most of them were dedicated to the training of scribes. Schooling was pretty much restricted to males from wealthy families, with young children being tutored primarily by slave or servant teachers. Crafts and trades specialization was pretty much the product of what amounted to apprenticeship programs in the field concerned.
Well, each other. Pretty much how Rick and my son (and myself) learned how do build things. Trial and error and we’d ask for help, or pay attention when someone was doing something we wanted to be able to do.
I learned how to lay linoleum when I called a contractor in to lay some linoleum on the kitchen floor. I paid attention and asked questions.
An interesting study is to go back and look at the evolution of the pyramids in the Middle East, starting with the burial mounds to tombs, to stepped tombs (ziggurats), the bent pyramid and so on culminating in the Great Pyramid. As the others said, Trial and Error and experience passed on from one builder to another both through success and through failure.
@stanleybmanly Upper-class women could also be educated and do various educated professions such as physician (most digestive tract specialists were women), embalmer, priestess, oracle, magician, scholar.