Jews did not take "last names" until very long after the Roman Diaspora divided the Jews into Ashkenazi and Sephardi groups. "Surnames" are a Gentile practice. The Roman Diaspora began after the Bar Kokhba revolt ended in 135 C.E.
Because of the resistance to this Gentile practice, Ashkenazi Jews were the last Europeans to take surnames. While there is a record of some German-speaking Ashkenazi Jews freely taking surnames as early as the 17th century, they normally did not do so until compelled to do so by law. Some merely kept their tribal name like the Cohens (kohen means "priest" or refers to a Levite in Hebrew).
This was the rule-of-thumb for the Sephardic Jews who lived in the Iberian peninsula, though it appears some, like their Ashkenazi counterparts did take up surnames freely (the last name “Marroquin” comes from Moroccan Jews who had come to see their home as their new “Promised Land” and thus named themselves after it). During the Spanish Inquisition, many of the Sephardic Jews made up names during the forced conversions that “sounded” Catholic like “de la Cruz” (“of the Cross”), or even created names that sounded like patriotic names. For instance, “Hernandez” is one of the most famous Sephardic Jewish names in the world. It was made up to sound like “Fernandez,” which means “of the sons of Ferdinand,” in honor of the king Ferdinand. They may have done this to sound like they were supporting Ferdinand and Isabella, the king and queen behind the Inquisition, but at the same time avoiding the actual name because they were the ones behind the forced conversions and persecution.
Before this, however, Jews did not have last names. Therefore Jesus of Nazareth did not have a last name. In fact, he may have been called things like Jesus (or to be more exact) “Joshua, son of Joseph,” or his name would be followed by his profession, his father and mother’s name, the name of family members, the town he was from, etc. It would depend also where a discussion about him was going on. If it was in Nazareth, he would not be called “of Nazareth” there. If no one knew Joseph or Mary or his family, these would not have been mentioned. He would probably have been called merely a teacher, preacher, or rabbi when there were no other ways to identify him as Joshua/Jesus was a common name at the time.