>"buy the fastest cpu and the most ram you can afford”.
I would append "subject to diminishing returns" for your use cases.
I could afford maxed-out computers (within reason) but, for most purposes, the premiums for the very top-of-line exceeds any discernible increase in functionality I would experience.