As a user of a standard PC in normal operation, you don't really have to worry about this question because the operating system usually regulates the CPU temperature by itself. As soon as a temperature previously defined by the manufacturer is reached, the CPU is throttled. This means that the clock rate is reduced and thus less heat is produced until the temperature is within the tolerance range again.
Nevertheless, poorly cleaned fans can cause the CPU temperature to turn out higher than necessary. Therefore, you should make sure to clean your fans regularly.
It looks different when you overclock the CPU to achieve better computing performance and speed. This is often practiced by gamers for the smooth running of online games.
In this case, the temperature can be lowered for a short time by opening the PC case or using external aids like fans. This supports the fan in its work because the accumulated heat can be removed faster, and a cooling draft can better reach the overheated components. Such methods provide short-term relief but are not a permanent solution. It often helps to lower the graphics settings to reduce the CPU temperature in games.
If you regularly use computationally intensive programs that drive the CPU temperature up, you can use certain programs to control the speed of the PC fan and adjust it individually in this way.
An even more efficient option is to install active cooling (e.g. water cooling). But before that, you should consider whether these measures are sufficient for your needs or the performance of your CPU, or whether it doesn't make more sense to upgrade to a more powerful processor.
Click here for important legal disclaimers.