Overall in a star gravity wanting to crunch the object is working against another force. In our sun the heat generated by fusion stops gravity. When out sun runs out of fuel the star will collapse until the repulse force of the electrons stops the collapse forming a white dwarf. As I mention in a neutron star the repulsive force of the neutrons stops gravity.
“In our sun the heat generated by fusion stops gravity. “
It does not ‘stop’ gravity. It counters the force of it. Airplane wings don’t ‘stop’ gravity either. They just provide a force that counters it for a while.