Answer:
What happens inside a star while it expands into a sunlight is that It is fusing hydrogen into helium in a shell outside the core after which the fused hydrogen in the shell outside the core generates enough thermal pressure to push the upper layers outward.