The essential factor to the initial formation of galaxies, for either of the theories describing galaxy evolution, is:
Massive gas and dust clouds collapse.
This process is key in both the hierarchical model of galaxy formation and other theories, as it leads to the creation of the first stars and structures that eventually evolve into galaxies.