My upgrade cycle is keep it as long as Apple continues to provide OS updates. Then trade it in and apply coin$ towards a new model or give it to relatives. This lowers the net annual cost of ownership for everyone.
My late 2012 iMac 27" will receive macOS Security Updates until late 2022. Hopefully your 2020 Mac will receive updates until 2030.
It depends on your use case and wear & tear. Mine has not changed since 2015. I am updating to a 2022 iMac 27" because I want to use the latest version of macOS for 8 years then receive Security Updates another 2 years.
From the a year One 22nm Intel chip to a year One 5nm Apple Silicon chip.
I then will keep this 5nm late 2022 iMac until late 2032 iMac when the chips will be sub-1nm.