Fire bolt cantrip. 120ft range. 1d10 fire damage. +1d10 at 5th, 11th, 17th. So at 20th level you're doing 4d10 fire at 120ft range.
Infinitely-ammo longbow. 150ft range. 1d8 piercing damage. Fighters get extra attacks at 5th, 11th, 20th. So at 20th level you're doing 4d8 piercing at 150ft range.
Both have access to feats that can increase their damage output either via direct damage bonuses or to-hit bonuses or situational bonuses. Both have access to magic items that can provide various boosts and bonuses and special abilities. Both have subclasses that boost their abilities, damage output, etc.
The fighter gets 2 whole action surges by 20th level, so they can make eight attacks (total of 8d8 either to a single target or spread out to up to eight targets) in a round two whole times every short rest. Assuming max stat mod, they all hit, and all do max damage, that's a 104 damage nova twice per rest.
The wizard gets Signature Spell, allowing them to cast two 3rd-level spells for free every short rest. Lets pick...say...fireball and lightning bolt. Fireball is 8d6 in a 20ft radius. Lightning bolt is 8d6 in a 100ft long, 5ft wide line. Giving the wizard a similar benefit of the doubt, say all fail their saves and about half the possible targets are hit (~20 for fireball; 10 for lightning bolt), that's a 1440 damage nova once per rest (960 fireball; 480 lightning bolt). Even cutting that down to 1/4 of all possible targets hit (~10 fireball; 5 lightning bolt), that's a 720 damage nova once per rest. Or about 7 times the nova of the fighter.
Again, they both have access to feats, magic items, subclass abilities, etc, so that's a wash. But the wizard clearly wins in that mock setup...and besides, that doesn't account for all the other world and game breaking spells the wizard can do often multiple times per day, like wish, forcecage, true polymorph, etc. And yet people somehow think there's even a question of LFQW not really being a thing. Hilarious.