Definitely not in Europe.
The modern concept of nobility has nothing to do with occupation or talent. It mainly had to do with land. It dates back to the time of fiefs. The people who owned the fiefs were literally land lords. The larger the fief, more money, the higher rank. You might be over lord to smaller fiefs. As time went on, lordships which back then came with land and money, were granted by the sovereigns. Political power, military strength and wealth helped raise you through the ranks. Some commoners may indeed enter the nobility based on their occupation, but very rare. Such as a kings minister or a military leader. As estates were inherited by children, these titles became hereditary. There were many wealthy people at court with title who would hope to gain one through service, or funding the king in some way, or marrying a child into it.
The ancient concept came from the early days of democracy and republic in Italy and Greece. Those who were elected to consuls and senators were considered a level above the common folk. They basically became aristocratic rank. When democracy failed, the concept of an aristocratic rank of society remained.