For me, it totally depends.
I got the iMac G3, iMac G4, 2006 Mac Pro 1,1, then Late 2012 iMac with the i7 and 680MX.
When I initially purchased it, I was planning on replacing my Late 2012 iMac around 2015-2016 time frame, but there was not a dramatic increase over the 3rd gen i7 in the Late 2012 iMac that warranted a replacement for my workflow.
Actually, it wasn't until the 2019 iMac that I considered replacing the Late 2012, but I had a crap load of medical bills to pay after a family member got cancer and needed surgery, so I put it off another few years.
I guess you can say that I finally replace my Late 2012 iMac with the M1 Mac Mini, but I was honestly surprised at the lack of the performance increase of the M1 Mini compared to a Mac that was 8 years older. It was definitely faster, but only about 50% faster for my workflow.
It just seemed like there used to be more dramatic increases in performance for Macs, but around 2013ish, it slowed. I assume this is probably true for the whole industry.