If you can afford to buy a new CPU, RAM, and better motherboard which work for your new CPU, it can be a good idea to replace the CPU and motherboard with a better CPU, motherboard, and RAM if your old DDR2 RAM does not work in newer motherboard which typically use DDR3 and DDR4 RAM.
Old CPUs, and RAM do break after many years of use, or from heat, regular use, and being shocked by too many power surges from your home's electricity, and static electricity.
Replacing the CPU, RAM, and motherboard at the same time can save you sometime in the future, and your computer will be more reliable since you are no longer using old RAM, and CPU which may more likely fail in the near future.
Old CPUs, and RAM do break after many years of use, or from heat, regular use, and being shocked by too many power surges from your home's electricity, and static electricity.
Replacing the CPU, RAM, and motherboard at the same time can save you sometime in the future, and your computer will be more reliable since you are no longer using old RAM, and CPU which may more likely fail in the near future.