The point wasn’t that ranged attacks or siege or cavalry weapons are more important than melee weapons, though depending on the battle or the century, that may well be true.
The point was that when it comes to melee, the weapons used by your infantry was never swords. Swords are prestige weapons, expensive and heavy, wielded by wealthy knights and nobility for ceremonial purposes, duels, or tournaments. The king cannot afford to equip a thousand infantry with swords (the way you see in movies like Braveheart or LotR), and even if he could, the infantrymen have neither the skill nor strength to wield them for an extended duration.
Swords weren’t the weapon of last resort. They just weren’t included in the loadout at all, of the soldiers engaging in melee combat. So what did they use? Spears. That’s probably why the OP says spears are king.
But take it with a grain of salt cause I don’t actually know anything about medieval warfare. It’s just a thing I heard.
Do people not remember back in the 2010s when bit.ly was the main link shortener used everywhere on the internet, and then Ghadafi, the then dictator of Libya, declared the site to be incompatible with Muslin decency norms because it was used for porn? And then all bit.ly links were just dead links?
How many times do we have to learn this lesson? Domain name hacks are fun but just not worth it. And in 2023, now we have all the new TLDs. This was a dumb decision