I use Aegis, which automatically backs up with each change to the database to a folder that gets synced to a couple of different computers via syncthing.
For backup codes, I have a separate keypass database that's backed up to a couple of places. I thought about using Bitwarden for this backup, but having my 2FA backups in the same place as my passwords kinda defeated the point, IMO.
I use the TOTP option in KeePassXC and KeePassDX to handle 2FA duties. I backup the encrypted file to my Nextcloud. If you self host Nextcloud or something similar this is a viable option.