Every few days there is a post asking whether they should wait to buy the next gen Mac, and people's responses are always no. And they'll make sarcastic comments such as "you should wait for the M6".
What a lot of people don't understand is that there's always a good time and bad time to buy/sell Macs. There's a timing factor, which is precisely why this very website has a buying guide - M4 MBP is a strong buy now, don't buy the M2 Mac Studio. This is mostly based on how soon Apple is expected to refresh the product line.
There is an additional factor, which is the generation changes Apple makes (or doesn't make) YoY. Just because Apple refreshes a product, it doesn't necessarily mean big improvements compared to the previous gen. The changes that cause significant drops in previous gen value are the change to M1, decrease in retail price (M2 Mac Mini), and RAM upgrade to 16GB. Conversely, if the year didn't have much upgrade (2017-2019 MacBooks), or the retail price increased (M2 MBA), then the previous gen holds its value extra well.
If you bought a 2020 Intel MBA after release it absolutely sucked. But if you bought an 2020 M1 MBA after release it would have held its value quite well up until recently.
If you selling, you're on the other side. You want to sell before any big changes are made that drops the value of your gadget. Buy low and sell high. Otherwise you have to eating the loss because of bad timing.