Every car from a dealership these days comes with a CarFax and these have become mostly useless as a buying tool ever since they became a car sales tool. However, they do often give you some insight into where a car has been via registration and title changes.
I keep a record of recent hurricanes and where reports of flooding happened. If I'm looking at a car, the first thing I want to look at is the CarFax to see if it's ever been out of state so that I can cross-reference it to my hurricane/flooding list. If there is any indication that the car might have been in the same state at the time that a flood happened, it's an immediate hard pass. Doesn't matter if there's no visible evidence of being a flood car, doesn't matter if the title is green. Some outfits are very good at cleaning up flood cars to look close enough to normal that the average joe can't tell the difference. All flood cars are supposed to get a salvage title but a lot of them slip through the cracks. It doesn't take a lot of searching to find anecdotes from burned buyers online.
I have passed on several cars that looked like great deals but came from flood zones and possibly passed through the hands of a few unscrupulous auctions, mechanics, and dealers on their way to my region.