Calibre has a fairly known Library structure (vanilla install)
The main folder is ALSO the Library Name.
This contains:
metadata.db <<the data that makes up what you see in Library view
metadata_db_prefs_backup.json <<<The recovery of structure and Per Library settings
Author Folders
Those contains 2 or more of the following:
cover.jpg
metadata .opf
1 or more of the Books formats
Calibre has extensions that allow OTHER STUFF to be in those folders, but the burden is on you to ignore those kind of errors when running
Check Library
Back to your issue. Your Library was probably being damaged while that HD was deciding to belly up . (Check Library is a great thing to do BEFORE making backups or transfers.)
OR
You stuck you neck out and used the Library over a Network Share or kept it in the cloud. (those are known ways to pain. When, not IF?)