A bank or brokerage can’t just take your money when you die. If you don’t have a will or other estate plan, the laws of your state determine who gets the value in those accounts. Your digital assets are a different story. Your online photos and videos, frequent flyer miles, cryptocurrency and other digitally stored files may well disappear without a trace if you don’t make a plan to pass them along. Conversely, some stuff you may prefer to shut down or keep private — emails and texts, social media accounts, dating app profiles — could be shared or hacked unless you take steps to secure the information. Estate planning experts recommend creating an inventory of your online accounts and digital files, along with your login ID, passwords, the answers to any security questions and what type of two-factor authentication, if any, is in use. (Two-factor authentication is often a code that’s texted or emailed to you or generated using a smartphone app.) Start with a list of your devices — smartphones, tablets, laptops, desktop computers — and their passwords, along with passwords to any important apps (such as that code generator). Then inventory the other electronic records you use, ow...