in the words of Willy Wonka, up and out. That's the only way we survive. I think the great filter is in front of us, and I think the great filter is Time as dictated by Gravity.
We have to leave but anything that can sustain us is not reachable by one generation (at current technology). Mars is an option (Think that show "The Expanse").
I think our biggest issue is balance. Too much War or too much peace are equally bad for the chances of our society and species to survive the gravity of earth.
I think AI will need to be leveraged to come to the conclusions/theories that we need to mathematically redefine our universe and ultimately traverse it.
Course, we could just be in one giant endless simulation that the AI runs ...
annnnd we're back to square one :)