Expansion kept the early universe from collapsing
The early universe was extremely dense, but it was also rapidly expanding. That expansion prevented the gravitational conditions required for a black hole to form, so the universe did not collapse into one despite its high density.