If you verification codes are not working on apple id then you need to sync your time and set data and time to correct and simply logout of apple id and login back and enter verification code that you receive recently or you can try send verification code using text sms and fix this verification code not working on apple id.