They can directly collapse to a black hole, they can become core-collapse supernovae, they can be torn apart by tidal cataclysms, they can be subsumed by other, larger stars, or they can die gently, as our Sun will, by blowing off their outer layers in a planetary nebula while their cores contract down to form a degenerate white dwarf. All of the forms of stellar death help enrich the Universe, adding new atoms, isotopes, and even molecules to the interstellar medium:
An Earth-based telescope has captured an interstellar object speeding through our Solar System, spewing a mysterious metal that defies natural expectations. The Very Large Telescope (VLT) in Chile detected an unusual nickel plume from the object, known as 3I/ATLAS, which differs sharply from natural comets that always emit nickel alongside iron, which was not detected. Harvard physicist Avi Loeb highlighted the anomaly, noting that this nickel signature is a hallmark of industrial production of nickel alloys.