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!