Driver type, impedance and fit decide the sound. Price and cable material decide almost nothing.
Wired earbuds have no battery, no codec and no app. What is left is the driver, the electrical load it presents, and how well it seals in your ear. Those three explain most of the difference between a 20 dollar pair and a 200 dollar pair.
A dynamic driver is a small speaker cone: it moves air, produces strong bass and costs little. A balanced armature driver is a tiny balanced mechanism that is very detailed in the midrange but weak in the low end, so it is usually paired with a dynamic driver in multi-driver designs. Single dynamic drivers now reach a quality that multi-driver hybrids struggled with a decade ago.
Impedance is the electrical resistance of the earbuds, and sensitivity is how loud they get for a given input. High impedance above roughly 50 ohms combined with low sensitivity needs a dedicated amp; a phone will play them, but quietly and without dynamics. Most phone-friendly earbuds sit between 16 and 32 ohms. Check both figures, not just impedance.
Bass response depends more on the seal than on the driver. A loose silicone tip leaks low frequencies and makes earbuds sound thin. Foam tips seal better and cost a few dollars. If a pair sounds disappointing, try different tips before concluding the earbuds are bad.
A detachable cable with a standard two-pin or MMCX connector turns a cable failure into a 15 dollar repair instead of a replacement. Straight versus angled plugs matter for phones in a pocket. Braided cables resist tangling but do not improve sound; anyone claiming otherwise is selling something.
Reserved recommendation space
For sound per dollar, usually yes, because there is no battery, radio or codec in the path. For convenience, no. Wired also avoids latency, which matters for video editing and gaming.
Only if your earbuds are high impedance or your phone's output is weak. A 20 dollar dongle DAC improves most phones noticeably with moderate-impedance earbuds.
Laptop headphone outputs are often limited in voltage. High-impedance earbuds will play quietly and lose bass. A small USB DAC solves it.
Three to five years with a detachable cable and replaceable tips. The cable joint at the plug is usually the first failure point.