About how the pressure of the Fermi gas restrains from compression
There are the reactions of nuclear fusion in the core of a star — of the formation of more heavy atomic nuclei, which is accompanied by the release of energy, which prevents collapse. As soon as the lightest nuclei are successively transformed into the nuclei of iron and nickel, the energy release decreases and the core of the star shrinks. The process of gravitational compression of light stars stops due to the pressure of the degenerate Fermi gas of electrons, but if the core of a star is heavier than approximately one-and-a-half masses of the sun, it continues to be compressed and finally converts into a single giant nucleus — a neutron star. If the core of a star is heavier than about four suns, then even the pressure of the degenerate neutron gas cannot resist gravity. In this case the star dramatically shrinks to the size of the Schwarzschild sphere, which is determined by its mass, and disappears leaving behind a black hole.