Armored knights are no longer active, right? Well it could happen to warships too. If anti-ship missiles and drones become so good that surface ships simply cannot defend against them then surface ships could become obsolete. Then navies might switch to only have submarines which will hide in the terrain of deep water to prevent detection.
There is a reason soldiers no longer fight in open fields, it's impossible to defend against bullets and artillery. Same thing could happen to surface ships. They are too slow, completely exposed and go down easily.
Kevlar cannot defend against higher caliber bullets and artillery. So soldiers usually hide in fox holes. There is no hiding spot in open sea. The only option is stay out of those missile ranges. Which means surface ships could only operate far from the shore. So essentially, they are relegated to deep sea pirates destroying merchant ships, not able to project power to land.
Again, I am not saying this will happen, I am saying it could happen if surface ships cannot defend against missiles. But maybe anti-missile defense will always be able to keep up with anti-ship missiles no matter how fast or maneuvering they get. Maybe ships will have lasers that can destroy massive missile barrage with ease.
Ships still have a chance if anti-missile shields keep getting better.
Sorry, but no.
I won't talk about infantries and land warfare in general since it's not my field of expertise and focus, but your attempts at shoehorning your reasonings across domains which shouldn't be seen as equivalents is just hilarious.
Surface warships are very much a must for not just fighting naval wars against the enemy, but also for
establishing presence and control at sea.
You can't do that with missiles for the latter.
Surface warships of today mainly rely on active defensive measures, namely radars and sensor systems, anti-air and anti-missile interceptor missiles, gun-based or DEW-based CIWS, electronic warfare/countermeasures (jamming, spoofing), decoys (smokescreen, towed decoys), and stealth (for certain ships) for defenses against enemy warplanes and missiles.
And as a matter of fact -
Shields and swords are always engaged in a never-ending arms race, and this has been true ever since the first humans graduated from the apes. You don't see the enemy putting up their arms and say "I yield! You win!" whenever the opposing side develops some new technology to overwhelm the enemy - They always adapt and develop something better to defend and overcome against whatever new technology the opposing side fields. The cycle continues indefinitely, because
survival is the fundamental instinct of the human race.
Moreover, you've been looking at things rather simplistically. Anti-missile defenses don't just rely on ships themselves - It's an all-encompassing effort across multiple domains: Primarily land, sea and air, but now with the addition of outer space, cyberspace and information space as well.
If anything - I'd say that
aircraft carriers are actually becoming more important than ever before, not just as
additional means of offense (i.e. delivering strikes against enemy warships and land targets), but also
additional means of defense (i.e. ship and fleet defenses against increasingly advanced and lethal anti-ship missiles).