Sun-Scaled Stars
After a giant-star comparable to the size of our sun runs out of hydrogen-fuel the release of its outer gas layers is very-certain (fireball passing away from the start) and left behind will be a dense-core, which we define as white dwarf.
Gigantic Stars
Above a certain mass the endpoint of the star is to collapse and undergo totally spontaneous nuclear fusion radiating immense amounts of light - a Supernova forms. Left behind is a dense collection of neutrons, a neutron star. When this neutron star collapse the gigantic mass will further excite further collapsing (stronger than the explosion that would otherwise take place) → a Stellar-Mass Black Hole is created.