All weapons systems are tools. And all tools are designed for a specific task, or set of tasks.
Just as a craftsperson or mechanic chooses what tools to own, based on anticipated functions and costs, so too a nation chooses weapons systems with the same parameters.
Every tool has its reason for being, and its inherent limitations. Because of that, all tool users who deal with more than a single instance of needing tools, will arrange to have a lot of different tools on hand, rather than spending all their money on just one, no matter how powerful it may be. The greatest hammer ever made, wont help you a damn bit if you are confronted by a screw.
All of that, is by way of saying that it MIGHT be a good idea to have ONE OR TWO of a certain kind of warship, but not a whole fleet of them. Battleships in particular were only more or less accidentally still useful after the end of WW1.
A good thing to look at as a part of thinking about this kind of decision, is the lessons that strategists had to learn the hard way about the intersection of massed infantry and tanks. It seemed at first, that having a movable artillery piece who’s crew was impervious to sharpshooters and machine guns, would be the king of the battlefield. But then it was discovered that a tank unaccompanied by infantry, couldn’t defend itself from intelligent attack by small, properly equipped infantry units. On the other hand, if all your army had was small properly equipped infantry units, and your opponent showed up with armored air support of the right kind and mix, you’d lose.
And so on. Military weapons strategists make the best educated guesses they can, as to what scenarios they are likely to have to deal with, and select the “tools” they hope will do the trick. In the event, it’s common for them to be wrong, not because they are all that lousy at guessing, but because the nature of the potential enemies is always in flux.