Your Macintosh HD recovery key is something that you’ll have been given when you activated that feature on your Mac. A recovery key gives you access to your Apple ID if you’ve forgotten your password. You can use it alongside a trusted phone number and an Apple device to reset your password. You can get a Macintosh HD recovery key by turning the feature on. I only recommend doing this if you’re going to be able to store and find the recovery key safely; otherwise, it could lead to problems later on.