Twitter is experiencing a worldwide service disruption preventing users from receiving account verification codes via text messages or phone calls. This makes it impossible for Twiter users who have set up two-factor authentication (2FA) through these two methods to authenticate on the website. Backup codes are automatically generated for Twitter users when they enable 2FA fort heir accounts using the iOS or Android Twitter app. They can also be generated using the Twitter app by going to Settings and privacy > Account > Security and tapping on Backup code.
Source: https://www.bleepingcomputer.com/news/technology/twitter-experiencing-issues-sending-account-verification-codes/