M4 is tempting and a decent time to upgrade if you’ve had an M1 since 2020 or 2021, but its exact specifications aren’t know for all lines yet.
So a plain M3 is better than a plain M2. The top end M3 Max is better than the M2 Max. For the rest, you have to do a comparison and determine based on your intended use-cases, but for most people the M3 {Pro,Max} will be better than the M2 equivalent.
See tables here
I'm still on M1 and I know that M2 and M3 would not change my experience for my web development work.
But yeah, if you're just going off the maker's marketing materials, then yeah, you'd always feel behind.
Granted, no gaming or number-crunching (that goes on a server!), just coding, browsers, and Excel.