Ghost towns are rarer, and it doesn't usually happen to major cities that have national recognition. There's a good list [1] on Wikipedia. tl;dr: they number in the hundreds, easily, but are largely small towns that you wouldn't have heard of unless you lived locally.
[1] https://en.wikipedia.org/wiki/Lists_of_ghost_towns_in_the_Un...
Some cities have increased population by expanding their city limits and annexing adjacent unincorporated areas or merging with other cities. And some cities had existing undeveloped areas. But for many cities, they were already completely built up and haven't increased their city limits. In that case, the main way a city can grow population is to replace single family detached houses with multi-family housing, or to replace smaller multi-family housing with multi-family housing with more units.
In metro areas that are constrained by geographical or regulatory constraints on the growth of suburbs, this was done. But in metro areas that don't have those constraints (most cities in the midwest) suburban land is cheap and that type of housing replacement doesn't make sense. When land is cheap, single family detached housing in the suburbs is cheaper to build per unit than multi-family housing, so that is primarily what gets built. In that case, even if there is no flight from the inner city or housing that is abandoned, the central city becomes less dense as household size declines.
I am genuinely curious to know what number of cities and towns in the US have lost at least 12 to 23 percent of their resident population, or have become ghost towns, in the past 100 years.