I don't use Lighroom, so can't give any direct help... but I will say that I never reuse an SD card until I have finished my picture editing with Photoshop... AND I have made a backup to a USB drive
The images should still be on your hard drive. You can reimport them. That won't recover the collections or the edits, but you'll still have your images.
Do you know where to find your images on your drive? If you haven't been consciously managing where the images copy to, then by default they get copied to your Pictures folder. I would start by looking there.
I received a message that lightroom encountered an error and needed to quit. Something to do with the cache
The message probably read Lightroom encountered an error when reading from its preview cache and needs to quit.
It means that you have corrupted previews.
So lightroom quits. I restart, and those images are gone. The collection sets are gone. I looked in all photos, they are not there.
It sounds like you opened a different catalog - LR should not allow you to open a catalog which has corrupted previews.
To fix the previews problem for the original catalog, use your OS (Windows Explorer or Mac Finder) to delete the previews folder.
The previews folder is located in the same folder as your Lightroom catalog, and its name ends with Previews.lrdata
On a Mac it may be displayed as a file instead of a folder, but it's the same thing.
With Lightroom closed, delete the previews folder - do not delete anything else.
Now launch Lightroom, and the previews will be rebuilt as you browse the Library.