Need recommendations on something like Vaultwarden but for 2FA only.

https://lemmy.dbzer0.com/post/889812

For people who don’t mind it not being self hosted: Authy is good for this. You can also set a backup password (to encrypt your tokens on their servers) and optionally use it cross device.

You can allow multi device temporarily to setup, then disable to not allow new devices, etc.

(I get you didn’t ask this specifically, but figure it could be useful to someone else).

There is also a authy-export tool that makes it pretty easy to export all the tokens to selfhosted pass repo.
GitHub - alexzorin/authy: Go library and program to access your Authy TOTP secrets.

Go library and program to access your Authy TOTP secrets. - alexzorin/authy

GitHub