Surnames seems to have been invented independentishly in Europe at a similar time: they were reintroduced after the Roman three-way names fell out of use in the West. From Wikipedia, I see it’s a messy web of transmission. Wikipedia suggests (not very loudly) that the Modern Western notion of surnames was transmitted from Armenia to Byzantium (from the 7th century on) to the West, though I wonder whether the West came up with them independently. Ireland had them in the 10th century, and England in the 11th; they only became common in the West in the 14th century.
Now, other cultures independently came up with surnames, as distinct from patronymics; the Chinese did, and so did the Japanese nobility. But how did a Western notion become globalised?
… Do you really have to ask?
During the modern era, many cultures around the world adopted family names, particularly for administrative reasons, especially during the age of European expansion and particularly since 1600. Notable examples include the Netherlands (1811), Japan (1870s), Thailand (1920), and Turkey (1934). Nonetheless, their use is not universal: Icelanders, Tibetans, Burmese, Javanese, and many people groups in East Africa do not use family names.
Surnames were put forward not just because of European influence, but because the emergence of big bureaucracies with nationwide scope saw the benefit in the European convention of surnames: that explains Meiji Japan, for instance. And of course surnames were still transmitted as a cultural meme, and not just a bureaucratic convenience. As pointed out in Kutluk Ozguven’s answer to Why do some Greek surnames end with “oğlu” which means “son of” in Turkish?, Christians in Turkey had surnames a lot longer than Muslims did, because Greeks and Armenians invented surnames to begin with.