The mass of stars affect how they end.
Stars with greater mass sometimes end with supernovas, a giant explosion, which can result in black holes or neutron stars, or sometimes nothing.
A medium sized star can result in a planetary nebula, which then results in a white dwarf.
Haha hope this sorta helped :)