Before upgrading you need to know what uses you will be using the computer for.
If you want it for just office work you won’t need a high powered computer you could get a very basic computer for a very small price, you could use onboard audio, video and network connector’s this will take more RAM space but because you will not be using so much of it for your gaming its okay.
But if you are looking for a computer to handle high quality games you will be spending a lot more money for high powered hardware and more than likely you will need nearly all new stuff, such as the main part your motherboard as if you are running a older computer it is very likely that you will not be able to run a better CPU which you would need to run high quality games then if your motherboard doesn’t accept certain parts which you used on the old motherboard you would also need to get more components, for example if you used to use SDRAM you might only be able to use DDR.