An ancient magnetic field drew matter inward and helped form our solar system’s planets, moons, and asteroids.