The Israelites were slaves in Egypt. The idea of having a written language was completely familiar to them. I donāt know how or when the Hebrew language developed, but I have no doubt that Moses could read and write in Egyptian, and other languages as well, in order to have diplomatic communications with other nations in the region. (Remember, he was thought to be the second son of Pharoah, and he would have been trained up from childhood in the arts of diplomacy and war, including reading and writing in a variety of languages.)