When will the world end?

How fast was comet Shoemaker-Levy 9 going when it hit Jupiter?
August 4, 2020
Why does earth’s distance from the sun change?
August 4, 2020

When will the world end?

as we know it will come to an end some time in the next 5 billion years.
It is possible that a super volcano or weapons of mass destruction could significantly change the climate and make parts of the planet uninhabitable.
As time goes on the chances of the Earth being hit by an asteroid or comet which is big enough to cause an Extinction Level Event increase. Hopefully by then we will have the technology to deflect the incoming object.
In about 4 billion years time the Milky Way Galaxy and the Andromeda Galaxy will collide. If another star comes close to the solar system it could disturb the Earth’s orbit out of the habitable zone or put something on collision course with Earth.
Ultimately in about 5 billion years time will enter its red giant stage. It will swell up to around the size of the Earth’s orbit. At that point to Earth will be either very close to the Sun or even inside it. The oceans will boiled off and the surface will become molten.