+1 on recovery before you do anything else. Donāt rush to click āEraseā (unless youāre cool with losing whats on there) Iāve had good luck with free tools TestDisk/PhotoRec, kinda tricky to use, but can do the job.
TestDisk can actually repair the partition table in some cases, so you might not even need to wipe the drive if itās just corrupted and not totally nuked. If youāre curious, the official TestDisk guide walks you through step-by-step.
In short, you run it as sudo in Terminal, pick your drive, and let it scan for lost partitions. If it finds something, you can often restore it right from there. Also used R-Studio a couple times, solid tool but kinda pricey.
Bottom line- get your stuff off the drive first, then you can mess with formatting.