Somehow I can't enable 2FA, the button is grayed out even after entering the correct code.
The button will be enabled and it will turn green, only if the typed code is valid:
Please try again.
Also, maybe you are using some incompatible app version.
Which app are you using?
Did you try other authentication apps?
I tried many times, I used Aegis authenticator app from F-Droid with TOTP type.
Did you try other authentication apps?
Also, check if the devices date and time are correct.

