Defender 2 Factor Authentication issue

Two-factor authentication is not working on my site. It shows the following error: Two-factor authentication is currently inactive. Configure and save your settings to complete setup.