How, exactly does a CPU generate heat?

Top 5 favorite answer ever.

So effect of smaller transistors > increased resistance?

The point is that there are multiple factors, some helping and some hurting. You’d need to look at them all together. You can’t just look at a single factor.

But in the end, the resistance was futile, as your processor still manages to get its tasks done.