Title, also, when did we all agree to using the same number system? There had to have been other systems than the decimal/base ten system we use now at some point.
I cannot speak to why the world accepted base-ten as the agreed-upon system of conceptualizing quantities, but I can tell you a bit about why we use the literal written numbers that we do!
We use the Hindu-Arabic numeral system, (often referred to just as the Arabic number system), in part because it's just objectively better than, say, the Roman numeral system. That is largely because it uses the number zero, which vastly improves efficiency. Again, think about Roman numerals. Instead of "350," you'd have to write "CCCL," simply stacking quantities instead of taking advantage of zero as both a concept and as a placeholder in the base-ten columnar system that we use to count. If you want to learn more about why zero is good and efficient, u/fubo wrote a very nice explanation of that here seven years ago.
This article talks about the origin of the concept of zero. It appears that the Mesopotamians had it, but it must have died out at some point, only reoccurring in Central America and in India. The Mayans died out without really spreading their knowledge of zero, but Hindu-Arabic numbers were used during the Islamic Golden Age, during what is sometimes called "the Dark Ages" in Western Europe. That's not really what scholars call that period anymore, with Middle Ages or Medieval being preferred, but it was called that because Europe basically lost almost all academic knowledge following the fall of the Western Roman Empire ca. 5th c. C.E. (with the exception of religious orders, which maintained literacy, etc.)
However, in the Islamic world (which at that point spread from Southern Spain across to Pakistan, basically, and in which Arabic was common, being the language of the Koran), knowledge and scholarship absolutely flourished, and many texts from the ancient world survive solely from being translated and recorded by Islamic scholars. One of the biggest centers of learning during that era was Baghdad's House of Wisdom. Scholars there literally invented algebra. Baghdad benefited from Islam's respect for education and scholarship, and from being along the Silk Road, along which many ideas flowed.
When Europe exited "the Dark Ages," and interest in ancient texts and mathematics and in general learning revived, the Islamic world was the source of that information. So that is the form in which mathematics as we know them today were spread to Europe, and of course most of the big colonial powers were European, and spread their numeric system as well as their language and religion and ways of seeing the world.