When the core of a star shrinks after hydrogen fusion stops, it heats up because of the increased pressure and density. This causes the star to evolve into a red giant. The outer layers of the star expand and cool, while the core continues to heat up. Eventually, the core becomes so hot that it ignites helium fusion. This process is known as the helium flash. The helium flash can be so powerful that it causes the star to pulsate or even explode. If the star survives the helium flash, it will continue to fuse helium until it runs out of fuel. At this point, the star will collapse and form a white dwarf.
Here is a more detailed explanation of what happens to a star after hydrogen fusion stops:
1. The core of the star shrinks and heats up.
2. The outer layers of the star expand and cool.
3. The star becomes a red giant.
4. The core becomes so hot that it ignites helium fusion.
5. The helium flash occurs.
6. The star pulsates or explodes.
7. If the star survives the helium flash, it will continue to fuse helium until it runs out of fuel.
8. The star will collapse and form a white dwarf.