Forgive me if a question like this is too general and isn't accepted here.
I'm currently working on creating a new universe to possibly be used in a D&D or RPG setting. I've been working on the creation story of a dark fantasy universe; ideally with having the universe initially mostly uninhabitable or populated with shapeless nightmare like creatures (think Lovecraftian like beings) as the only inhabitants.
I need some catalyst that causes the creation of humanoids, and their ascendance to god-hood. These new gods will wage war on the Lovecraftian beings eventually banishing the old beings to outer or other realms. The new gods use their power to re-craft the universe to be habitable to humans and humanoids, eventually creating new races to populate the remolded universe.
What are some possible catalysts that would create these new humanoid gods in such a chaotic and uninhabitable setting?
Edit: I would like to keep the catalyst and ascension to some specific event contained in this chaotic universe. While it would be easy to say that one of the Lovecraftian beings create humanoids and help them raise to power, that does not fit with the feeling I'm going for. I want the Lovecraftian beings to truly be 'other' and 'chaotic'. None of them would ever seek to bring order to the universe or create a being capable of bringing order. I also don't want the catalyst to come from another universe; it's too easy to say that an object from another universe or reality interacting with this one is what creates these new beings who are capable of bringing about order. I hope that helps to specify what kind of answer I'm looking for.
I envision these gods similar to the Greek, Norse, or Egyptian Pantheon. They are sentient beings of varying intelligence but extraordinary power (enough power to reshape the universe to better suit them and their worshipers' needs, as well as enough power to create life from non-living materials). While extremely powerful they are not all seeing and all knowing, but are practically immortal (possible to be killed under very specific circumstances, but it isn't easy).