Aside from their abilities, all mutants age a lot slower than humans. This was the reason why some mutants like Magneto believe that they were chosen by evolution to rule over the world and the weak humans. This resolve was only strengthened by Eric's experiences with human savagery during the holocaust.
The existence of mutants have been known to the world throughout human history. This however, have been kept in secret by governments because mutant numbers are still small and manageable. To avoid panic among the citizens. The government have been in talks in the background with Eric and Xavier's institution to quell and quickly silence any incidents involving mutants. The X-Men were sent in covertly.
Eric have always been against this stating that it was supposed to be a sanctuary for mutants and not an institution of puppets under human control. Despite this Magneto went along with it for years as he still believes in his
friend's vision.
Sometimes during these incidents, Magneto and the entire X-men have seen first-hand what humans were capable of towards mutants out of fear, hatred and wanton discrimination. Over the years Magneto became angrier and angrier until during one of their missions where they found out about experimentation done on mutants by another country.
This led Magneto to ultimately leave the team and start his brotherhood. At first, the brotherhood went underground as the time was not yet right for mutant domination for their numbers were still few.
Add the fact that some members had to face off against the Avengers. Luckily, such incidents were few and the heroes only know them as "enhanced" for Nick Fury nor the government have yet to disclose this information.
Post Infinity war, the world was in chaos. The destruction left by Thanos left a huge part of Earth in ruin and millions died around the globe.
This was the time Magneto was waiting for. And so from out of the shadows, Magneto and his brotherhood announced to the world than their rightful rulers have arrived.
The Avengers were quick to answer the new threat but were stopped by Nick Fury. "Gentlemen, meet the X-Men"