I'm only joking a little. Funny thing, surnames aren't actually that old for Europeans. Most of history there'd be maybe two people with the same name. They solved it back then very much the same way we solve it now.
Funnily enough, my "full id" (full name, city, profession plus year) isn't unique to me unless you add a date of birth.
Maybe it's not unique with a date of birth either, but statistically it should be.
It's a regional thing, but roughly translates to "John Smith, programmer from NY, born 1995"
The son of John who is a smith
I'm only joking a little. Funny thing, surnames aren't actually that old for Europeans. Most of history there'd be maybe two people with the same name. They solved it back then very much the same way we solve it now.
https://en.wikipedia.org/wiki/Category:Occupational_surnames
https://en.wikipedia.org/wiki/Patronymic