First it spawned a galaxy of stars using RNG.
Then it seeded civilizations at different home stars throughout the galaxy.
Then it iterated an algorithm to show how they spread, settling more and more solar systems, expanding outwards. After a certain number of centuries, solar systems became "decadent" and stopped seeding other solar systems (I showed this by rendering them a darker shade of color). Systems that bordered those of another civilization had to reach a certain high population threshold then they were able to "take over" neighbors, but IIRC I coded it so that didn't happen very often. There wasn't any real diplomacy or war system like in real video games.
I would make some tweaks to the algo, then rerun the sim, and watch the civs spread out slowly in real time. It was pretty.