After Starlight Glimmer changed the past to get revenge, Twilight got stuck in the timeline with the war against King Sombra. That was 5 years ago. In the time since, Twilight has given up on trying to return to her timeline and is doing her best to protect this one.
With Ponyville holding out as the last stronghold against Sombra's unstoppable march of destruction, Twilight fears that Sombra may have a plan that could crush them once and for all.