Maybe it's just a construct of movies and video games, but it seems like the sword is the bread and butter weapon of soldiers during the middle ages, and that other weapons, such as axes, were far less commonly used. Is there any truth to this? And if there is, how did the sword rise in popularity?
The sword was not so much the default weapon as it was the iconic weapon of the age.
There isn't a lot of archaeology to say what percentage of people used one weapon over another. Records for battles like Agincourt indicate that the English army was predominantly archers. Only about 20% would have even been infantry forces. So for that battle the vast majority on one side wouldn't even have a sword. What was the rate of sword usage throughout the period? Who knows.
For your question though, I don't think it matters. The reason we see the sword as the classic medieval weapon is because that is how the people at the time saw them. Owning a sword would have set you apart from other people in society. It meant that you were a soldier, most likely of higher status than normal. Many of the surviving examples are highly decorated with gold and gems. These items were used to show a person's status as a warrior. That all became part of contemporary culture. Swords were the weapon for great heroes. Some named examples you would still recognize. Excalibur for King Arthur. Hrunting for Beowulf. The people of the time would have told these stories about their warriors and the swords they wielded. Even contemporary art, like the Bayeux Tapestry, shows knights and warriors using swords. The common foot soldiers are more often background characters. The legends, and myths, and stories, that were told and passed down were about gallant knights and horses and swords. Not peasants in the mud with a stick. So looking back, that is what we see brave knights with swords.