I had to do it in the mobile browser. In settings when you turn on 2FA, a button appears above the checkbox. I tapped it in my mobile browser and it opened my authenticator app.
I was having trouble getting my Lemmy 2FA into 1Password because of this as well. It turns out the 2FA button is just a link that was I was able to right click copy link and paste into the one-time password field (aka the 2FA field) in 1Password and it worked. In editing mode, the original value I pasted is accessible so I guess that counts as a backup?