In my story, I wanted to have a world in which humanity had nearly gone extinct from being eaten by demons but eventually the demons ran out of humans to eat and thus died off or went into a sort of hibernation- the humans that survived live in a vault that has been around since 5000 years prior. How would I make it so that the vault would last that amount of time and accommodate a large population as well as a feasible energy source to pull it off?
First, I assume by "vault" you mean some kind of sealed or enclosed space cut off from the Outside World. The demons won't be able to get in and don't know about the place.
- An experimental United Earth Space Agency cryo centre hidden away somewhere in the wilderness of Manitoba is close to finishing its final experiments in advance of UESA's launch of three great Outbound ships, destined to send Mankind out towards the stars. Once it became clear that the demon hordes posed a critical threat to humanity, the commander of the facility ordered the "final experiment" to be converted to Active Status: all ten thousand cryosleeping people in the facility will continue to sleep for 5000 years (amazingly enough, the time it would take for the Outbound ships to reach their destinations) at which time, the automated systems will begin waking them up. The facility is powered by a combination of robust solar, ultramodern wind and the wonders of Mr. Fusion --- together there will be plenty of energy to keep the cryosleepers in dreamland for the duration. The commander and staff of the facility hope that, by then, the demons will either be starved to death or simply have gotten bored hunting down the hardy souls hiding the mountains or in the Arctic somewhere.
- The "final experiment" was a great success! The resources of the Seven Realms of United Earth have been well spent and the three mighty Outbound starships are in orbit and ready for launch into the deeps of space. Ceremonies held all around the world are designed to fete the wildly famous Ten Thousand before sending them off to their fate. At last, the ships are ready and the inhabitants are securely asleep. The crews of each ship have assumed control and the Outbound are, well, outbound! After several months in space, Outbound have passed beyond the Heliopause and are racing now through interstellar space. The crews lock down all manual systems and switch over to automated controls before they place themselves into their own slumber chambers. ... The crew of Outbound 2 awaken from slumber and after their recovery period begin to reactivate the manual controls. Far, far in the distance, a bright yellowy disk can be seen. "Star ho!" cries the astrogator as she begins to assimilate Navcom's data. "But this is strange...this system appears to be...Sol?"
Depicted: the Mountains of Madness from my favorite Lovecraft story. The Elder Things put their city within a protective ring of mountains so high that only with a plane could the explorers get over them. Additionally, on the tops of these mountains were caves in which dwelt certain... sentinels. Game of Thrones uses a similar method to keep out monsters - a preternaturally high wall built by First Men, although instead of supernatural monsters at the top there are scruffy bearded dudes.
Your humans do not live in some dim cave, gnawing fungus and ranching crickets. They are like the Eloi, scantily clad beauties living in a green, paradisiacal valley, walled off from the demon world by the last herculean efforts of their distant ancestors. The humans do not cross the mountains either - whatever the ancients left on top works to keep in as well as keep out.
5000 years is a long time. The humans might not remember why they live in a ring of mountains, or why they do not try to cross the mountains, or what is on the other side. Maybe the demons do not remember either..
If you want your survivors to stay active, no vault could have that huge a food supply to help them survive. You are either looking at they hibernating, too, inside the vault or needing to get out of the vault from time to time as a search party looking for food. However, to not have an encounter with the demons this long on their food expeditions requires some answers you have to focus on. If you are looking at only the energy requirement of the vault, then you can buy the idea from the NASA rovers where they are dependent on the energy from sun. On days or extended periods where sun is feeble enough as an energy source, it could add another element of tension regarding the survival of the vault and the refugees inside.