How do people make these text-based games?
if you mean what program do they use, a lot of them use Twine :)
This is made using Twine / Sugarcube