It's a hugely complicated issue.
USS Texas was the very first explicitly donated/museum ship, and that was 1947.
It was close to a decade before that was replicated.
Some of that was Service-related; a large number of ships were considered "war reserve" and not elligible to be converted into museums. In fact, there used to be a bunch of rules on just how a ship could be displayed, and what changes to its readiness were allowed.
The heavy cruisers were especially complicated They were much more econmical to operate than battleships in peacetime. Which gave them high value. Which reduced their likelyhood for recommendation for preservation. This even while the rapid-fire 8" rifle was making the older classes obsolete. But, that obsolescence is also what sent them to the scrappers faster than normal, too (along with guided missile conversions).
Lastly, operating museum ships is a very expensive operation. It wants millions in capital just to get started; you also need millions in infrastructure, too.
It turns out, too, you need to be able to have access to more millions for periodic maintenance, too. Warships need drydocking for hull maintenance and replacement of expendables, like anodes. This was a very hard lesson learned with Texas, which went 40 years grounded in a muddy slip in brackish sea water before being drydocked (the 88-89 shipyard trip replaced an etraordinary amount of material, and cost millions). Now Teas is way overdue of another drydock trip, which is complicted by limited access to the sea and to shipyards, and deteriorating conditions (they have been replacing floors in the boiler flats and engine rooms for nearly four year now) The only afforadable sloution will be to make a dry berth for the ship, which will run to about $25 million and take about 5 years
North Carolina just finished a huge cofferdam project to better control the water around the ship, and to prevent issue about leaks and the like. Alabama just went through a similar situation. And, we need look no further than Olympia to see what happens when maintenance is deferred or neglected.
Yes, more ships should have been (and should be now) preserved. The fabric of history is worthy of preservation, and we ignore our history at our own peril Sadly, though, dollars do not grow on trees. I appauld the groups who have managed to preserve what we do have.