Start with what's actually bothering you
Generic 'upgrade order' lists assume everyone starts from the same place. You don't. The right first purchase is whichever piece of your current setup is the loudest complaint — not whichever piece looks best in a photo.
Ask yourself: is it the chair that hurts after an hour? The keyboard that feels mushy? The monitor that's too small to see enemies at range? That's your answer, and it's usually obvious once you say it out loud.
If you're starting from zero
Order matters more when you're building from scratch, because early purchases constrain later ones. Buy in this order: desk, chair, monitor, then peripherals. A great keyboard on a wobbly desk is a worse experience than a good keyboard on a stable one.
Resist buying peripherals first just because they're cheaper and more exciting. A $60 mechanical keyboard on a $40 wobbly desk is a worse experience than a $30 keyboard on a stable $120 desk.
If you already have a desk, chair, and monitor
This is the most common case, and it's where 'upgrade first' questions get interesting. Three sub-cases:
If you're on integrated audio or a cheap headset: audio is your bottleneck, and it's the cheapest fix relative to how noticeable it is. A closed-back headset or a desktop microphone punches above its price.
If you're on a membrane keyboard and a basic mouse: input devices are next. You touch them thousands of times per session — the return on a mechanical keyboard and a properly weighted mouse compounds daily.
If your monitor is under 60Hz or noticeably small: this is worth prioritizing over peripherals for competitive genres, but is a lower priority for slower-paced or narrative games.
When to stop upgrading
Every category has a point of diminishing returns. Going from a 60Hz to a 144Hz monitor is transformative. Going from 144Hz to 240Hz is subtle for most players below a competitive skill ceiling. Spend where the jump is perceptible, not where the spec sheet number is biggest.