Let's say that, hypothetically, you were the god-emperor of the entire world during the Middle Ages (yes, it still only has Middle Age technology n shit), but you have full authority over it. Right now, all over the world, there are wars, famines, diseases, political extremism, mental insanity, suicides, torture, riots, slavery, human trafficking, dangerous predators, even climate change (for some reason), and pretty much every other horrible problem you could think ever that plagues humanity. People dying is an extremely common sight, practically unavoidable, and for most people, life is unbearable agony.
Not even people in the upper echelons of society are safe from suffering, the only people that are safe are you. Enough people will survive so that your kingdom is still (barely) maintained and humanity still lives on after all of this. Humanity as a whole will continue living under constant crisis, and this will continue on for hundreds of years, if not, millennia, and there is seemingly no way to solve this on your own. The world population is expected to reduce by at least 95% by the time this is all over.
But then, in the middle of all this, aliens living in a type 4 civilization (multi-galaxy level) have suddenly come down to Earth in hopes of negotiating with you. It turns out that your planet is abundant in an element called Elementium (real creative name, I know). You're not exactly sure how it can be used, but what you do know is that if you would ever want your species to ever be able to expand beyond your home solar system, this element is borderline essential.
Now, with that knowledge in mind, you have two options: