If we see a city in any Trek show, we can assume it wasn't totally destroyed in that war, otherwise it wouldn't be there. It would take at least a couple of hundred years to completely rebuild a major city from the ground up, especially after World War III.
If we saw a 24th century city completely identical to its 20th century appearance, we could assume it was rebuilt as a museum piece, with great expenditure of resources for supposed great profit, and in a short period of time.
However, the only museum piece we ever saw was New Orleans, or at least a few city blocks of it. Cambridge had been "ruined" by the liberal addition of modern buildings, so the odds of it being a rebuilt/restored museum are low. Ditto for San Francisco, in all its Trek incarnations. Any city that flaunts a mixture of old and new buildings is probably a true WWIII survivor where the old buildings are the bona fide originals...
Probably the war spared major First World cities which had defenses in place, but devastated the even larger Third World cities that did not. Small towns like San Francisco would be irrelevant to the total death count anyway: we never saw any part of Mexico City, Cairo or Beijing remaining, never mind possible emergent supercities in the southern hemisphere.