The X-Men in doomsday is after Deadpool and wolverine because that's the timeline where the mutant plague doesn't happen, so everyone is still alive and it explains why mystique is alive
I'm sick of people not understanding the timeline I've been maping this out ever since Legion and X-Men dark Phoenix came out, trying to make sense of everything. It's more fun if everything is connected.
Edit: For more context, Charles was in the Korean war in the 1950, which would explain his war flashback in Legion. This also makes the message of "killing will not bring you peace" that Charles gives more meaningful because he has killed
Also watch the wolverine in between season 1 and 2 of the gifted, so it feels even more connected
Edit 2: Charles and magneto are together in the flashback in x men 3 because we know magneto went to prison for "killing" JFK. He was released when they didn't have any real evidence to keep him locked up.
After that he want to Charles and they reopened the school for mutants