Put in a nutshell, Cosmology is the science that deals with the nature of the universe as a whole, and what allows us to understand just how our world works and where it comes from.
Usually, there are two different approaches to help determine how a particular world has come into existence. The first of which would obviously be the creation of the universe by a single super-being or a group of particular deities, usually tied together nicely with a creation story.
That’s all well and good, but that doesn’t mean that there aren’t other ways through which a world could technically have formed. After all, how does one go about creating a new world when we don’t even understand how our own first came into existence?