Easier said than done if they have Fireball, Lightning Bolt, or Haste prepared. A Wizard gets two 3rd level spell slots at level 5, and I hope you enjoy getting smacked in the face for an astounding 8d6 damage on a failed Dexterity save. 2nd level spells like Flaming Sphere, Blindness, and Darkness will all act as crowd control and if you get within 15 feet that's when they pull out a Burning Hands., Color Spray, or Expeditious Retreat, all three of which are 1st level spells. The amount of bullshit a single caster can pull even at low levels is ridiculous.
Meanwhile a 5th level Fighter gets... an extra attack, a single bonus from their Martial Archetype, an action surge, and they can recover 1d10+5 HP, the latter two needing them to take a breather after being used.
Naturally, Haste is a better action surge since it lasts a minute and boosts AC, doubles movement speed, and gives advantage on Dexterity saves on top of giving the Wizard an extra action. Yay for Fighters! Oh, and if you need some emergency HP as a Wizard, False Life has your back.