Comparing AirPods and EarPods isn't as simple as "wired versus wireless." AirPods are packed with modern features that make them go far beyond a simple pipe for transmitting audio. Take the AirPods Pro 3, for example, which can track your heart rate during a workout. There's also Spatial Audio and all the specs that make them sound great. In comparison, EarPods are just regular earbuds. They lack fancy gestures or voice commands.
Yet they can be better than AirPods in some ways. EarPods require zero maintenance. No battery means no charging, so they're ready whenever you are. Compare that to leaving your AirPods sitting off the charger for a few days and being greeted by a red battery icon. Having a cord also means zero pairing issues stemming from Bluetooth. There's no need to worry about re-pairing if you want to share your earbuds with a friend either.
The built-in EarPods microphone also delivers better voice quality. While Apple has done a good job of improving this aspect of AirPods, Bluetooth audio still doesn't sound as good as wired audio. They even come in three connection types: 3.5mm, Lightning and USB-C. That makes EarPods compatible with a wide range of gadgets, and they're cheap enough that you could buy separate pairs for different devices.
Due to the lack of a headphone jack on modern iPhones, though, using the Lightning or USB-C port for EarPods means you can't charge your phone while using your earbuds. If this poses a major issue for you, an adapter that splits the port into two is an easy fix, though it's not as convenient to carry around and have attached to your phone.