“You can turn on a recovery key (has been available as part of 2FA but not in iOS/Mac settings like this before) or add a recovery contact.”

Link. Google has better support for the problem of mortality.