... and yes, the net cost to switch to a new computer will increase over time. Yet it's also more expensive to switch computers every 1-1.5 years than doing so every 3-4 years if you're looking at it purely in terms of money. There may or may not be an offsetting benefit value to that intermediary upgrade - depends on your specific individual needs.
I'm using my 2015 right now (my 2014 has been loaned out). Money wasn't the factor - it was Apple putting out laptops with issues for so long. I used to upgrade every year on Windows laptops. Then switched to Macs in 2007 or 2008 and I generally keep them for ten years though they become backups after about six or seven. I'd like to get an M1X 16 and use it for the next decade. Ideally as my primary but primary for six years and backup after that would be okay too. The M1X will have more compute than I need. It should have the GPU that I want (2xM1). And 32 GB of RAM should be fine.