Yes, there was nothing before God created the world, only darkness. With the command of the Almighty Lord, everything came into existence, including the planets.