I think we are on a knife edge of ecological and societal collapse, but we might just make it through.
Most of the problems we face here on earth are of our own making. They are related to overconsumption of resources, and that is mostly related to overpopulation and greed. There are too many of us, and we are using up the resources faster than they can be replaced. If nothing changes, and critical resources run out, what will follow will be degradation of the environment, resulting in failure of agriculture, leading to famine, then starvation, then war, and finally canibalism ---- complete collapse of society, no more online forums.
In that scenario, I don't think humankind would go extinct. Society would collapse, and everyting we know and care about would be destroyed, but some vestige of the human species would survive to live on in a greatly diminished world. The kinds of things that would lead to extinction are impact by a large asteroid, all-out global nuclear war, or some kind of runaway global warming that would make the planet uninhabitable. Short of that, I think the human species is tough and smart enough to survive, even if it means living like rats for a few thousand years.
I think that aggressively moving into space is part of the solution. We need to find new resources in space, especially energy, so that we don't continue to degrade the planet. We need to find some room to offload some of the overpopulation. We need to get some people into safe places other than our planet so that if things go bad down here, we've got someene to keep it going out there.
In addition to moving into space, we need to get a grip on what we are doing to this planet. We are like the inhabitants of Easter Island who expereinced their own ecological and societal collapse. We are isolated and we are focused on building our idols while we run through the last of our resources. We need to realize what we are doing, stop stripping our island of the trees that make life possible, care for our environment, keep our population in balance, and find a way to spread beyond our island. It would be a shame to end up like the Easter Islanders did.
I think we are basically in a race to save ourselves. We are definitely speeding down a path to destruction, but we also have the knowlege ans skill to save ourselves. The only question is whether we will act fast enough.