Final answer:
Firstly, check the cooling system of the desktop by ensuring the CPU fan is running and the heat sink is properly mounted. If the issue persists, inspect the thermal paste application and BIOS settings for temperature control.
Step-by-step explanation:
If you've just upgraded the CPU in your desktop system and it shuts down spontaneously after a short period, the first thing you should check is the cooling system. It's possible that the CPU is overheating due to improper installation of the heat sink or thermal paste, or because the cooling system isn't functioning correctly. Start by checking to ensure that the CPU fan is connected and running. Then, check that the heat sink is properly mounted on the CPU with an appropriate amount of thermal paste applied for efficient heat transfer. If those steps don't resolve the issue, consider checking the BIOS/UEFI settings for temperature thresholds and fan speed controls.