Muslims believe that the Quran was revealed to the Prophet Muhammad by the angel Gabriel, and Muhammad then recited these revelations to his companions, who memorized and wrote them down. Although the Prophet Muhammad was known to be illiterate, he was able to recite the Quran perfectly and accurately, and he spent much of his time teaching it to his companions and followers.
The process of the Quran’s revelation and preservation is believed to have been miraculous, with the angel Gabriel delivering the message of God directly to the Prophet Muhammad. This message was then memorized and recorded by Muhammad’s companions and later written down in a standardized form after his death. The companions of the Prophet were known for their exceptional memory skills, and they were able to preserve the text of the Quran in its entirety.
Therefore, although the Prophet Muhammad was illiterate, he played a central role in the revelation and preservation of the Quran, and his companions and followers were instrumental in ensuring its accurate transmission and preservation.