The oldest stars have heavier elements in them besides hydrogen and helium, which had to have come from a previous episode of stellar formation and death. Also older stars as well. See old red stars in elliptical galaxies and in the spheroidal part of the spiral galaxies. Star formation ended a long time ago in the elliptical galaxies and in the halos and bulges of spiral galaxies. Disk stars orbit in one plane, in the same direction, orderly progression of orbits as the stars get further from the center.
Spheroid stars have random directions, random elliptical orbits.
The stars in the disks and the stars in the spheroids formed in different ways. The simplest model is that the stars in the spheroids formed first, soon after the protogalactic cloud came together and it was still irregular in shape. This explains why the oldest stars have random orbits. We still need to answer why there are both elliptical and spiral galaxies, and how some irregular galaxies were formed. A good theory needs to account for what we see and make testable predictions.