Wizard Duels

Wizard duels that only involve spellcasting are affected by several factors. Primary defensive spells are Shield, Absorb Elements, Protection from Energy, and of course, Counterspell. Higher level wizards can shelter in a Globe of Invulnerability. Duels between mid to higher level wizards might drag on until they run out of 3rd level and higher spell slots. However, Counterspell requires the caster to see the enemy, so Counterspell can be defeated by darkness, blindness, or invisibility. Dispel Magic does not require seeing the target, but can dispel a spell effect within range regardless of location or vision.
Counterspell can also be circumvented by casting a higher level spell, forcing the defender to either make a roll, or burn a higher level spell slot on the Counterspell to maintain equality with the attacker's spell. Analyzing the enemy's spell requires an Arcana roll to predict the attacker's spell. If the defender has the spell in their spell book or memorized, the DC is 10, if not the DC is 10 + the spell level. Spells higher than the defender can cast or from divine casters are at disadvantage.

Sorcerers' metamagic feats give them advantages against other casters. Quicken Spell allows them to cast a cantrip or spell as a bonus action, doubling their attacks, and Subtle Spell lets them cast without warning, preventing the spell from being stopped with Counterspell. Transmuted Spell lets you change the damage form of a spell to evade the target's defenses. Against wizards, poison would be the best damage type.

Consider your enemy when choosing spells. Wizards have better Intelligence and Wisdom saving throws, Dexterity and Constitution will be fair, Strength and maybe Charisma least. Avoid spells requiring Intelligence and Wisdom saves against wizards or clerics. Sorcerers are best at Charisma and Constitution, Dexterity will be fair, then probably Wisdom, Intelligence, and Strength.

Absorb Elements and Protection from Energy guard against the big damage forms; acid, cold, fire, lightning, and thunder. So spells that do force, necromantic, poison, psychic or radiant damage are harder to block. But once cast, each defense spell only protects from a single damage type, if you can hit with multiple types, it's more effective. Also, Protection from Energy requires an action, so it could be counterspelled. While Magic Missile is an extremely common spell used by wizards and deals force damage, against wizards it is normally completely countered by Shield. Unless you can get behind them where they are unprotected by the Shield.

Other advantages are things like feats. Lucky lets you reroll your attacks and saving throws or to force an enemy to reroll a successful attack.

Note that this discussion mostly applies to one on one wizard duels using only spells under formal conditions. Battleground or adventuring combats allow use of magic items and previously cast spells. For example, a wizard knowing a lich is around the corner may cast defensive spells ahead of time so as to be able to focus on offense. Also, magic items like wands allow you to cast spells that can't be counterspelled.