According to current scientific estimates the Earth is around 4.5 billion years old and the universe is around 13.75 billion years old. If these calculations are correct, even approximately so, then there were billions of years between the creation of the universe and the formation of our planet. Even then the Earth would wait over 4 billion years for the appearance of life, around 150 million years ago.
From a human perspective it is difficult to conceive of these lengths of time — a human lifespan is a mere speck in comparison to these vast stretches of time. We might feel that these vast stretches of time were wasted time; that nothing really important happened until the appearance of humans. But this is actually a rather arrogant and presumptive stance, as if humans were the only thing that mattered in God’s creation. God is eternal — he is not in a hurry — why shouldn’t he take billions of years to delight in his creation, if he chooses?
There may also be practical reasons for these vast stretches of time. If the Standard Model is correct, and the universe was created at the Big Bang and that galaxies, stars and planets arose from this initial moment, then actually these lengths of time are needed to arrive at the universe as it is today. So if that was God’s chosen method of creation — rather than, say, an instant creation — then these vast stretches of time would be necessary.