You might still be able to use it if you carefully superglue back the plastic part.
A more permanent fix would be to replace the SATA connector and solder a new one by someone with the proper skillset.

The important parts are still in good shape, don't throw it away!
Some routine maintenence and losing your balance while holding a hard drive and ripping the cord out breaking the retainer for the connectors..... 4tb Samsung ssd RIP