I’d advise first of all not to panic and just check everything carefully. In general, things like this can be clarified pretty quickly with VIN reports. I personally recommend
FAXVIN, everything is done fast there, and the info comes from official sources, government registries, and insurance companies. The report will clearly state whether there was a salvage title, total loss, insurance write off, which insurance company was involved, and the date and reason for the write off. If the car was written off financially, it almost always shows up in a VIN report, even if it was restored later. So yeah, a VIN report plus title status plus an independent inspection is the minimum set when buying a used car.