By Allah -azwj ...
By Allah -azwj , Rasool-Allah -saww was able to read and write in seventy two’ – (or said) – ‘seventy three’ ‘languages, and he -asws has been called ‘ Al-Ummy ’ because he -saww was from the inhabitants of Mecca, and Mecca is the mother of all towns, and that is in the Words of Allah -azwj Mighty and Majestic: and for you to warn the mother town (أُمَّ الْقُرى) and the ones around it [6:92] . And the mother of towns is Makkah.
These words, do not refer to the writing of the Quran, these words, nevertheless, clearly state that -saww never recited nor wrote down any Scriptures before the Quran, meaning, never went to a school or visited a teacher before the Revelation of the Holy Quran, so was taught by Allah -azwj and not by others.
و في العيون عن الرضا عليه السلام في حديث: و من آياته انّه كان يتيماً فقيراً راعياً أجيراً لم يتعلّم كتاباً و لم يختلف الى معلم ثمّ جاء بالقرآن الذي فيه قصص الأنبياء و أخبارهم حرفاً حرفاً و أخبار من مضى و من بقي إلى يوم القيامة And in (the book) Al-Uyoon – ‘From Al-Reza -asws , there is a lengthy Hadeeth.