I don’t know if he had nothing to do with the Koran, but he was illiterate, so he did not write it down. I think it was written after his death by people working from oral traditions, and then later, the differing versions were compiled with some of it left out and destroyed. To top that off, you have the Hadiths, or “sayings” of Mohammed, which is more oral tradition, written by a whole bunch of people who said they heard Mohammed say this, that, or the other.
“but he (Mohammad) was illiterate,”
If he existed at all, he was probably literate because he was a trader with several countries and tribes. I’m sure he knew well how to read and write.