Why? Nice planet we’ve got here, we could focus on preventing it becoming inhabitable due to climate change instead.
No matter what you do the Earth won’t stay habitable forever. So we either learn to expand out into space as a species or face extinction eventually. Not to mention putting all our eggs in one basket is a terrible idea. Any cosmological event could wipe out the Earth at any time. The question is are you okay with our entire species going with it?
There needs to be a backup, ideally multiple.
the answer is yes. I am ok with our entire species going with it. Death comes for us all it should not be seeked out, but neither should it be feared.
How to survive in space: Develop ways to survive in space only first. Once you manage that all the other problems are trivial compared and you don’t have a single point of failure (aka our planet) anymore. Isn’t that obvious?