I'm of the opposite opinion. I think we need to spread out as soon as possible because it's not clear we can ever completely future proof our civilization here. There are simply too many things that can go wrong, many of which are not within our control. Take the pandemic for example, if it had been 10x worse it could have collapsed our current global civilization. There's no way of preventing it from spreading to every corner of the Earth without also destroying civilization as we know it. Same goes for asteroid impacts, super volcanos (consider Tonga a warning), tsunamis, solar flares, CMEs. Then there are the man-made disasters that we may or may not be able to keep under control such as war, terrorism, religious fanaticism, industrial accidents, pollution or even just apathy and hedonism.
I'm not saying we should ignore all the other things in favour of escaping to space. The Earth is the largest volume of habitable space that we have right now but it is also the only one and that's the problem. We should be building other habitats in parallel with solving our current problems. We need a literal backup plan in case things go seriously wrong.