Does Starfleet have a
Junkyard for obsolete out of service ships , or are the ships broken down and recycled into New
Starfleet Vessels
I believe there were, at least, two references to a Starfleet museum for some ships. Star Trek III, I think. Maybe a NextGen episode.
An episode of NextGen was reusing an old Starfleet vessel for a war game.
Star Trek: The Motion Picture showed that Starfleet does refurbish some older ships.
At least some such vessels are sent to the surplus depot of Qualor II, visited by the Enterprise in the TNG 2 parter episode Unification.