Medieval guilds were associations of craftsmen or merchants who banded together to set standards for quality and pricing while protecting their members. This meant guildsmen were shielded from outside competition, and it established clear standards for each trade that the guilds themselves oversaw, which benefited customers as much as members.
Training was standardized too, giving young people well-defined paths to learn a trade and eventually become masters. Guilds also banded together in ways that sometimes led towns to adopt republican governments, known then as communes, though the word carried a meaning closer to today's "commonwealth."
Cities with such governments could enter into treaties with foreign nations, boosting trade. Larger organizations of these cities, like the Hanseatic League, worked to protect trade routes. All of this helped raise the general level of prosperity during the era.