The burning is regulated. If too much energy is temporarily lost, the star contracts and heats, increasing nuclear input. If too much energy is temporarily gained, the star expands and cools, and nuclear input declines. When hydrogen is burned out in the center, the helium in the center is too cool to overcome the charge repulsion of its two protons. The helium core leaks energy to the outer layers, contracts and heats up until the charge repulsion can be overcome and helium burning commences.
Excess heat flowing from the core causes the outer layers to gain energy.
They then expand and cool. The outside becomes larger, cooler, and redder. The star becomes a red giant. Stars pass through several burning stages, burning out a fuel, contracting to get hotter and able to overcome the charge repulsion of ever more protons per nucleus. Primary heavy elements, C, O, Ne, Mg, Si, S, Ca, are multiples of He with equal numbers of protons and neutrons.