I used to think a lot about up-gradability before but often find that when a cpu is too slow then it is also so old that I have to change the motherboard and ram too for compatibility reasons.
Same thing with the motherboard, if it fails I’ve never had it be new enough that I can bring my cpu and ram with me to my next motherboard (unless buying an older motherboard second hand).
And many of my disks will be old enough that I want to replace them too, at least if they have anything important on them.
Only things I’ve brought with me when upgrading desktops have been my case (including fans), psu, gpu and (some) disks.
Having a quiet and dust proof case that is easy to build in and a good psu that cultists.network/140/psu-tier-list/ endorses has become higher priority to me since then, as I know they might last me more than one build.