The movie doesn’t explain exactly what happened, only that Professor X lost control of his powers, resulting in many deaths, including several of the X-Men. He doubled down on this with Logan, setting it in a world where mutants are all but extinct, and the X-Men have been destroyed in an event dubbed The Westchester Incident.
James Mangold made a concentrated effort to distance The Wolverine from the rest of the X-Men movies by separating Logan from the team and only having a handful of mutants appear in the story.