How to add recovery codes to entries

At present, there is no way to set the recovery code for the password entry with TOTP enabled. How do you use Bitwarden to solve the problem of using the recovery code?

Personally I use the Hidden type custom fields for 2FA recovery codes, these also are included in value exports with an item so very easily to maintain a backup as well.

But recovery codes usually consist of multiple sets of codes, and are useless once used. Is it less convenient to use hidden type fields?

Really it probably comes down a personal balance of security and convince IMO.

You may have a separate secure storage location for your security codes, though that may or may not be the same location as your Bitwarden vault backups. If they are in the same location it may make sense to store this in your Bitwarden vault.
Though it most likely would be a different story for say a cryptowallet seed-phrase.

Very true, and while depending on the account and site some manual formatting may be needed, as custom fields do not support multiple lines. I usually simply paste this into a single custom field, rather than create an individual field for each. Though whichever option you chose could work.
As far as using them, this can just simply be edited and changed once a code is used, though I would argue you likely aren’t going to use your 2FA recovery codes often.

Is it possible to give logical support for 2FA recovery codes. Set up multiple sets of recovery codes and set them to expire once used.

Sorry just a bit confused by this question. Could you reiterate what you are trying to specify here?

You could create a custom field for each unique recovery code for a login, and simply edit the item and delete those entries when used.

But nothing that would automatically expire them when used, Bitwarden would not be able to tell when they were used with a 3rd party service, unless you wished for the field to simply be removed and deleted after being copied the first time.

It is only necessary to determine whether it is copied, and if it is copied or used for population, it is judged to be used and set to expire.
This may be a good approach.