Your whole life is probably on your iPhone - which you've probably got backed up to iCloud.
But what happens to your online accounts after you die?
Apple introduced a new Digital Legacy service that allows you to nominate up to five people as Legacy Contacts to your Apple ID.
After you pass away, your Legacy Contacts can request a digital key from Apple to access your data like your iCloud Mail, Photos and Notes. A death certificate is required before access is granted.
If someone dies without nominating any Legacy Contacts, their next of kin can still apply to Apple to access their data or delete their account. In some cases a court order is required.
Apple encourages people to include information about their Digital Legacy plans in their will or estate plan to ease access for next of kin.
To add a Legacy Contact, you'll need an Apple device running iOS 15.2, iPadOS 15.2, or macOS Monterey 12.1. You'll also need to turn on two-factor authentication (where a confirmation message is sent to one of your other devices) and be over the age of 13 (Apple has Digital Legacy how-to here).
Facebook lets you nominate a Legacy Contact, who can download a copy of your account, delete your account or run a Memorialised version of our account - which features a pinned memorial post. Your Legacy Contact can decide which tributes get published and respond to people to send friend requests (though not add new friends). More details are here.
Google does not have a feature to nominate someone to control your accounts before you die per se.
But under its Inactive Account Manager service, it does allow you to add a trusted contact whom the company will contact if your account has been inactive for a set period of time.
You can choose whether the trusted contact is merely informed that you have not been using your accounts, or whether they gain access to your data after a nominated time period.