Truly, the Bible is ahead of Science. The only issue is that we many times do not understand what the Bible is saying until after a time.
Looking at the end of the world, modern Science says our sun is programmed to last 10 billion years. So far, according to the estimate, the sun has another 5 billion years to live, having stayed for 5 billion years.
Science says in about the 5 billion years to come, the sun would have exhausted its hydrogen store from which it is deriving energy by nuclear fusion.
We know that if the sun could no more produce energy its light source would be over.
Now, compare this scenario with what Jesus says in Mark 13:24. "But in those days, after the tribulation, the sun shall darken, and the moon shall not give her light."
If you realise that the moon derives its light from the sun, is it in doubt why it can no more give light when the sun fails to supply its light?