This is something we are being asked on a daily basis and the answer requires you to consider a number of parameters.
In general if you are happy with your PC's performance there is obviously no compelling need to make any changes. However to ask this question you are probably not happy and long for a system that will be fast and will support the latest software.
But let's see at some questions and answers that will help you make the decision between upgrading and purchasing a new computer.
How do you intend to use your computer?
If your intended use is browsing the web and checking your emails, upgrading your hard drive to an SSD and/or upgrading your RAM should be a more than enough upgrade, provided that your computer is not more than 5-6 years old.
If however, you run demanding applications such as image editing software or wish to play the latest games, it is worth considering buying a new computer, as upgrading only certain components of your current computer will probably not be enough. For example the processor you may wish to upgrade to may not be compatible with your current motherboard so you may need to buy most of the components new. Unless of course you own a laptop where the upgrade capabilities are quite limited compared to a desktop computer.
What is your current budget?
If your budget does not allow you currently to purchase a new computer with the specification you require, then a component upgrade is a very cost efficient way to give your computer the breath of life it needs and buy you time.
Are you certain that your computer needs upgrading or replacement?
It may be the case that the degradation in your computer's performance may not be related to hardware but to software. Perhaps your computer is clogged with unnecessary files due to a large number of temporary files. Perhaps your hard drive is close to filling up.
It would be a good idea to declutter your computer so that it runs as efficiently as possible.
Changing your operating system may be a valid option as well. Windows 10 tends to be more resource efficient than previous versions of Windows for example or you may choose to start using a Linux distro that will give a great boost in your computer's performance as they tend to be non-demanding in resources
Are you ready to start becoming familiar with a new computer?
Chances are that you have become comfortable with using your current computer and switching to a new one will force you to go through the procedure of reconfiguring and reinstalling everything that you need.Is it worth the trouble just yet?
Do you really need to have applications installed locally?
There is a growing trend of applications to be hosted on the cloud and accessing them through a web browser. That takes of the burden of processing power from your computer. The most commonly used software are available on the web on a subscription basis. By doing this you are also forgoing the purchase of expensive software.