Stars above 8 solar masses can turn into neutron stars or black holes because during their life they have two forces counteracting gravitational collapse: electron degeneracy pressure and thermal pressure from fusion. When the fusion stops you’re left with a massive body where the electron degeneracy pressure alone isn’t sufficient to counteract gravity. https://en.wikipedia.org/wiki/Chandrasekhar_limit.
You get a neutron star instead of a black hole when the gravitational collapse can be overcome by the strong force and neutron degeneracy pressure (the same forces that keep the nuclei of atoms from collapsing).
Stars above 8 solar masses can turn into neutron stars or black holes because during their life they have two forces counteracting gravitational collapse: electron degeneracy pressure and thermal pressure from fusion. When the fusion stops you’re left with a massive body where the electron degeneracy pressure alone isn’t sufficient to counteract gravity. https://en.wikipedia.org/wiki/Chandrasekhar_limit.
You get a neutron star instead of a black hole when the gravitational collapse can be overcome by the strong force and neutron degeneracy pressure (the same forces that keep the nuclei of atoms from collapsing).
See this more general description of the fundamental forces: https://en.wikipedia.org/wiki/Fundamental_interaction