It is very important to make a good choice before buying a CPU. Here are a few things that needs to be checked.
Compatible with the motherboard
It's always necessary to make sure that the new CPU is compatible with the motherboard, which is done by verifying that the CPU and the motherboard use the same socket
(see find CPU socket
You should also make sure that your motherboard allows the CPU to be changed, compact devices such as laptop and mini computers with Intel Atom CPU often have welded CPUs that you can't replace.
Better than the previous one
Unless the plan is to replace a defect CPU, it is necessary to make sure that the new CPU is faster than the previous one, otherwise there would be no advantage (see compare CPU speed
Be sure that the fan is included in the box and if you buy an extreme CPU, be prepared to buy a more expensive fan because these CPUs generate a lot of heat.
At a good price
You can of course buy something nice without killing your bank account. Inside a range of CPUs, there is always a huge price variation between the most powerful and least powerful, it is then possible to buy a high range CPU without taking the most powerful and still have a reasonable invoice.