Dark matter plays a crucial role in the formation of the first galaxies. Unlike ordinary matter, which interacts through electromagnetic forces, dark matter interacts primarily through gravity. After the Big Bang, slight over-densities in the dark matter distribution began to grow, eventually forming the gravitational wells that would attract ordinary matter. These wells served as the seeds for galaxy formation, pulling in hydrogen and helium gas from the surrounding space.