Welcome to our new Microsoft Q&A Platform.
For your question, it is depend on your product key type, where do you get it?
If you bought the key from a Microsoft retailer, of course you could activate your new SSD by this product key, even your product has been using on the PC. Note, one proudct key can only actiave one PC, change hard disk is allowed, but actiave two PCs is not allowed.
Reactivating Windows 10 after a hardware change
https://support.microsoft.com/en-us/help/20530/windows-10-reactivating-after-hardware-change
However, if your product was bought from OEM, this key is bound to the specific device, you need to consult seller for help.