PBS had a wonderful series Ancient Earth that covered the geological history of the earth. https://www.pbs.org/wgbh/nova/series/ancient-earth/
My naive understanding was always that the earth or planets just sort of found a natural state of being after a while and were / are just that way now. It's very interesting to see the sea saw type scale of changes that occurred over time.