There's a good post going around that (rightly) points out how the idea of abandoning Earth even after a tremendous disaster along the lines of asteroid impact or global thermonuclear war makes little sense, because terraforming any other planet will be harder than fixing Earth. This is true. This is correct. We need to be fixing our own climate right now, but even if we don't, murderously-hot Earth with flooded lowlands will be vastly more habitable than anywhere else we know of.
Other people will often point out that we should be focusing on terrestrial problems, and they're right to a point. We absolutely need to be prioritizing fighting anthropogenic climate change, solving problems like hunger and lack of shelter and overhaul our political systems until they actually serve the many and not just the few. That this somehow rules out the very important science of studying the cosmos and sending probes and even people out to explore is a sort of false dichotomy though.
We can do several things. If you're talking about money, sure, first things first: seize hoarded wealth and pump it into making sure everyone has the freedom from want that our technological abundance should have guaranteed generations ago. Thing is, there's still lots left over at that point. So we fix the climate, and we transition to a more sustainable future and we reduce waste and we right the global inequality that allows some nations to thrive on the plunder of others.
And there's still plenty to go around. The old adage that "The Earth can support billions, not billionaires" is exactly right. We need to fix our mistakes, but we also need to look to the future. Fully terraforming Mars and Venus is currently beyond our means- we'd need to find a way to re-start their tectonics for any long-term solutions -but there's no reason not to get started on making other homes for humanity as well as the original and by far the best option we're likely to see. There are ambitious ideas about how to get started, and it's the work of generations to get anything resembling progress, but so long as we're taking care of Earth, there's no particular rush anyway.
The cosmic 'speed limit' might keep us forever trapped away from more Earth-like worlds, even if we should develop relativistic travel at a significant fraction of the speed of light. We just don't know how many Earth analogues there might be out there, and if any are within whatever our ultimate range may be. In which case it will be all the more important to adapt the barren worlds that are within our grasp to better suit us.
Earth is likely to be the best home we'll ever know, and unlikely to fall below the top ranking unless something truly catastrophic and cosmic should come along. But it is, ultimately only one little world, and while it might be far more robust than we often think, it remains vulnerable in its status as our only home. The more we spread out, the further we go, the safer we become as a species, the longer we can continue producing culture and all the other things that make us worthwhile.
Someday the end will come. If we treat the Earth perfectly but never leave, and nothing unexpected happens, the sun will heat up to the point where life as we know it can't continue, and then eventually likely consume the world entirely. If we spread out to span our own system, then a nearby supernova might sterilize the whole thing. Even if we (or beings descended from us) somehow survive to spread across the galaxy, survive the merge with Andromeda, and continue on into the most dizzying limits of the future, the stars will burn out and eventually matter itself will likely be torn apart on the subatomic level. There is no 'forever' for us, our time is finite.
But there's no reason to let a capitalist death-cult end us before our time. Fix the world. Do what we can with others. Thrive.