Depends on what you do. If your job relies upon editing LOG 12 bit 8K footage then probably yeah, sell it and get a new one. But if you only surf the web and use Office from time to time then you can push more than 10+ years from this machine.
I bought my maxed out M1 Air in 2022, i.e. when it was already 2 years on the market. I wanted to avoid as much as possible “butterfly” type of manufacturing faults that Apple is known for. And? So far so good, I watch movies on this laptop and surf the web, 16 hours battery as promised and still going strong enough. Not planning on selling since selling is always losing money, not earning. Although I am already getting tired of it and will probably get some fast Windows laptop or M5-M7 15’ Air instead and will give this one to my parents. Because thats what I always do whether it is iPhone, iPad or anything else. And devices are used until full end of effective life which goes far beyond official updates support. With your machine you can expect fresh macOS versions until 2029 I think.
There are people on this forum still playing around with theirs 2007 17’ MacBook Pros or even G5 machines, installing hacks and stuff. While they already have their fresh daily drivers, those purely ancient dinosaurs are great hobby machines (given the battery is removed hehe).
Surely lifespan of new MacBooks with soldered batteries and stuff is not as promising, but maybe I am wrong and my M1 Air will live until 2034 and battery won’t even pillow, who knows