After following along with Patrick Stewart’s experienced Professor X in X-Men, X2: X-Men United and X-Men: The Last Stand (along with a cameo in X-Men Origins: Wolverine), X-Men: First Class provided the opportunity to show Charles Xavier taking his first steps to becoming one of mutantkind’s greatest figures.
By the time the events of the latter movie unfolded, 30 years had passed since McAvoy’s Professor X met Michael Fassbender’s Magneto and was shot in the spine.
While it was clarified in X-Men: Days of Future Past that McAvoy’s Charles was indeed Stewart’s version from decades past rather than a completely rebooted version, the timeline changes in that movie allowed McAvoy’s Charles to travel down an altered life path in X-Men: Apocalypse and Dark Phoenix.