M1 is a kind of “emergency tax code”, meaning it's only supposed to be temporary until HMRC has enough information to issue you the right code.