Weapon attacks compared with damaging cantrips?


Cantrips scale automatically with character level. Weapon attacks only scale with ability score and any extra attack features you might get.
How could the damage of weapon attacks keep up?