I don't get why you guys are confused it so simple.
Timeline 1:
Elria is born an elf, she becomes a hero, invents magic then falls to despair and becomes the demon queen Elria. Vegalta loses to Altein in this timeline because they didn't have magic tech from Elria.
Reid becomes a sage and revolutionizes invents a lot of science stuff which Altein uses, he dies before meeting Elria.
Elria as the demon queen hates the humans and basically wins but her father made a spell with collaboration with the current generation hero that lets them go back to the past with her memory wiped to make it so all the bad things go away which leads to timeline 2
Timeline 2:
The timeline where the story takes place
Timeline 1 Elria and her father, who traveled back to the past and spreads magic knowledge to Vegalta which evens out the balance of strength between the two countries.
Reid becomes a hero instead of a sage.
Elria got killed by the current generation hero (this guy wielding the giant axe). Reid dies going to her funeral.
Vegalta won the war, the emperor fled to timeline 1.
Elria's father erased Altein from history. Elria's father also reincarnated both Reid and Elria and that's how the story started (chapter 1).
Current arc: The giant axe guy is trying to save his people by opening a portal so people from timeline 1 can migrate to timeline 2 because even though Elria already left timeline 1, the monsters she made as demon queen are still wrecking the world and pushing humanity to the brink.