Not all warships get to fight in wars. There are some warships that never get to fire in anger at any foe at all. Here are just several warships that I think were great warships that never had a chance to fight in a real war.
USS Nautilus (SSN-571): America's (and the world's) first nuclear-powered submarine was a game changer when it was first launched. Its was made famous through the first underwater voyage under the North Pole. Other than that and an embarrassing collision with aircraft carrier USS Essex, USS Nautilus (SSN-571) had a largely uneventful career. After it was decommissioned, USS Nautilus (SSN-571) was preserved as a museum ship.
Sweden's last class of cruisers, the Tre Kronor-class, did not get to fire a shot at any enemy vessel in anger at all, mainly due to Sweden being neutral in World War 2, as well as Russia choosing not to go to war against Sweden during the Cold War. Even under the Chilean flag, the Tre Kronor-class did not get to fire a shot in anger.
The De Zeven Provinciën-class cruisers from the Netherlands was another class of cruisers that did not get to fight against Russia or any of its clients during the Cold War. Even when in the service of the Peruvian Navy, the De Zeven Provinciën-class cruisers did not get to fire a shot in anger because whatever conflicts Peru was having during the time when they had the De Zeven Provinciën-class cruisers did not take place anywhere near coastal areas.
Britain's Tiger-class cruisers did not even get to fight in the Falklands War at all.
Chile's Almirante-class destroyers, like their Tre Kronor-class cruiser Almirante Latorre, never got to fight in any war at all.
Due to Canada staying out of wars in the years between the Korean War and the Gulf War, many Canadian warships did not get to fire a shot in anger. The Mackenzie-class destroyers were among those Canadian warships because they were not part of the Canadian flotilla involved in the Gulf War.
Italy's Impetuoso-class destroyers never fired in anger because the only communists that Italy had to fight against were not the armies of communist countries but Italian communists who use underhanded or subversive means to overthrow the enemies of communism in Italy.
These are just several great warships that did not get to fight in a war. There are many more great warships that did not get to fight in any conflict at all. Then again, any warship that stays out of war stays out of harm's way altogether, if the naval battles in World of Warships or War Thunder do not count, that is.