The English word algebra is literally from an Arabic term: al-jabr. Like alcohol, and tons of other words you use almost every single day, like cotton, coffee, sugar, candy, lemon, zero, decipher, and even tariff, which Trump loves (it's Arabic via Italian).
https://en.wiktionary.org/wiki/algebra
Yes, based on earlier Indian mathematics, but further developed by Muslim mathematicians (or at least people living under Muslim rule). The word algorithm comes from the name of a Persian guy called Al-Khwarizmi (say it fast – the W is silent), who further developed algebra and wrote a treatise on it. You wouldn't even be able to use half the internet without him.
https://en.wikipedia.org/wiki/Al-Khwarizmi
People in the ancient Near East weren't all literate, sure. Neither were most people in Europe til very recently. But writing has existed for eons. There are Arabian inscriptions dating back 4,000 years:
https://en.wikipedia.org/wiki/Ancient_South_Arabian_script
According to Islamic tradition, the Prophet Muhammad was illiterate, yes (which is "ummi" in Arabic). One of the main features of the Quranic revelation story was that, according to tradition, he was unable to read, so when the angel Gabriel (Jibreel/Jibril) appeared to him in the cave and commanded him to "Read!" (iqra') he replied twice that he couldn't. But the Arabic word for "read" also means "recite", so finally on the third command, Muhammad understood and recited what is believed to be the very first verse revealed of the Qur'an. (https://quran.com/al-alaq)
During the Islamic Golden Age, the Abbasid Caliphate preserved and transmitted a huge amount of knowledge from ancient Greek, Latin, Persian, Sanskrit and Syriac sources in science, medicine, astronomy, optics, and other subjects that would've been lost during the European Dark Ages, and preserved a large number of texts by translating them to Arabic. Translation was a big thing during that period.
So yes, you're right that they drew on earlier knowledge from other cultures, just as European scientists drew heavily on Greek and Roman and other sources, and scientists today build on the accumulated knowledge of centuries. Standing on the shoulders of giants and all that. Knowledge is cumulative. Muslim thinkers and scientists also contributed a LOT, while Europe wasn't really doing nearly as much comparatively. A lot of knowledge would've been lost if not for this.