Why didn't god just smite only the people he thought were fucked up?
In the story sin was so widespread that Noah and his family were basically the only ones left that were free from sin. And if you see sin as a cancer spreading and rapidly taking over, it's easier to euthanize and begin anew. One could imagine that if the world was allowed to keep going then sin would only get worse and humanity would just keep getting more and more depraved and miserable. Now god as an omnipotent being should have been able to predict all of this, which is a giant plot hole in the story. But despite that I don't think it's too unreasonable. It's like if you built a rabbit house but it turns out all the rabbits (except a couple) get rabies and all start biting each other. Better to euthanize everyone and start over.
Why did he basically do the same shit twice (the first time being saving Lot's family and destroying Soddam and Gomorrah)?
Well there it was extremely clear that Sodom and Gomorrah did not have a single non sinner left. That's kind of the main plot point in that story. Abraham tries to save the cities by negotiating with god that if he finds just 50 righteous people god won't destroy the cities. This is negotiated down and down until god promises that he will save the cities if just 10 righteous persons are found. Abraham finds no one except for Lots family hence the cities are destroyed, after Lot and his family were rescued.