What causes a mid-mass star, after exhausting core hydrogen, to swell into a Red Giant?

Answer

Hydrogen fusion igniting in a shell surrounding the inert helium core

When core hydrogen is exhausted, fusion shifts to a shell surrounding the inert helium core. This new shell burning releases more energy, causing the outer layers to swell and cool, forming a Red Giant.

What causes a mid-mass star, after exhausting core hydrogen, to swell into a Red Giant?
evolutionlife cyclestarmass