Processes in Microsoft 365 for setting up Office apps, redeeming product keys, and activating licenses.
If you have a Time Machine backup or have made a backup disc image of your old drive before removing it, you can use Apple's Migration Assistant to restore your prior installation and your license will carry forward.
How to move your content to a new Mac - Apple Support
Unfortunately, changing the hard drive looks to Microsoft Office that it is now on a completely different Mac. There was a time when 2011 was still supported you could call a phone number and Microsoft would issue a new product key to you. Support for 2011 is over, so this service is no longer available. If this is the situation you are facing, you can buy a brand new product key from eBay or other reliable source. They're going for about $20 US right now, which is cheap because the product is discontinued.
Download Office 2011
https://www2.downloadoffice2010.microsoft.com/macdl/registerkey.aspx?culture=en-us&ref=macdl
Something to think about for the future is that Apple is threatening to drop support for 32-bit applications someday. They are throwing warning dialogs that this will happen, but have not announced when it will happen. You might consider getting an Office 365 subscription that will give you Office 2016 right now and in a couple months it will be upgraded to Office 2019. If you are one of the very rare people who obtained Office 2011 via an Office 365 subscription, you can upgrade to Office 2016 without extra charge immediately.