It works, but it’s half-assed. The way Lemmy sets it up only works on a portion of authenticators, and ones like Authy isn’t one of them. Then it also doesn’t have a confirmation before enabling it, so you may think it’s working but then get locked out of your account when you can’t log in next time around.
The best way to test it is to enable 2FA and set up the code, but keep your Lemmy settings open. Then open an incognito window and see if you can log in using the 2FA code. If you can’t, go back to the settings window and disable 2FA.
I’m surprised I haven’t seen more posts yet about this. A rogue or compromised admin put JavaScript redirects on Lemmy.world as well as changed the name and some other things. The other admins removed the compromised admin, but then about 30 minutes later they were reinstated and started wreaking havoc again. The instance eventually went offline completely.