The X-Men have a long and illustrious history at Marvel Comics. Their comics included the bestselling issues of all time. Before the Marvel Cinematic Universe (MCU) engraved itself in the public consciousness, the X-Men were Marvel's A-listers. The X-Men kept Marvel going through some dark times, and it can be argued that the X-Men were Marvel's most important concept. This wasn't just because they were a guaranteed sales juggernaut, but because their role as a civil rights allegory made them more thematically important than any other group of superheroes. The Avengers were popular, but compared to the X-Men, their exploits and adventures felt less significant to current culture.
Source:https://www.cbr.com/x-men-flawed-wrong-civil-rights-allegory-marvel/