An i9/i7 CPU uses about 150W (watts) of power. Which means that it somehow "dissipates" that much energy, mostly heat. Let's say it dissipates 120W as heat, which is a fair estimate.
Let's say the CPU weights about 60g = 0.06kg. That means that the CPU dissipates :
120W/0.06kg = 2000W/kg of heat.
For argument's sake let's say this is some new age alien tech that only dissipates 1 W as heat. That would imply our CPU dissipates :
1W/0.06kg = 16.7W/kg of heat.
The sun dissipates about 4x10^26 W of heat. The mass of the sun is about 2x10^30 kg. That means that the sun dissipates a mere: 0.0002 W/kg = 0.2 mW/kg of heat.
So, the average CPU dissipates many orders of magnitude more heat per unit mass than the sun.
Lol, that's why it gets hot.