When the sun goes supernova and takes all of us with it. (if we haven't figure out how to get off this rock by then)
We're OK on that one as the sun can't go supernova. It doesn't have enough mass. Not even close.
What will happen is that the sun will bloat into a red giant and then shrink into a red dwarf. All life on Earth will be killed, but in a slower way than a supernova. It would be worse than a supernova for any life that might still exist on Earth at that point in time.
As for humanity having an end game, I think we'll continue to have fragmented ad hoc responses to events, ideologies and changes in technology, without any coherent game plan. Humans just winging it in a partially organised way, as has been the case since humans existed.
My guess for the end of human civilisation is disease. Covid-19 has exposed the fragility of modern civilisation. There is vast scope for things to be far worse, a disease that's more contagious and far deadlier. Or maybe it'll be triggered by the failing of antibiotics. Antibiotics are far more important to human civilisation than many people realise and bacteria are evolving resistance to antibiotics faster than humans can devise new antibiotics.
But there are many options, especially when there isn't a self-sustaining human colony on another world. There have been five known major extinction level events on Earth before humans existed. Earth is remarkably stable, but it's not completely stable. Anything on that level will eradicate human civilisation and possibly make humans extinct. Lesser disasters might bring down human civilisation too.