A galaxy is a group of stars held together by gravity. It can be compared to a city, held together by human behavior.
Q: Which came first, some buildings or the city?
A: The buildings.
Similarly, which came first, the galaxy or some stars? Answer is, the stars.