A Galaxy is a gravitationally bound system of stars, gas, dust, dark matter, and often a central black hole.
Our Sun lives in the Milky Way, which is just one galaxy among a ridiculous number in the observable Cosmos.
Galaxies form, merge, and evolve over cosmic time, and their heavy elements are constantly replenished by events like supernovae.