That's what a carrier is: an irreplaceable multi-billion-dollar sitting duck. This was adequately demonstrated by Lt. Gen. Paul Van Riper, who (IIRC) spoiled a major wargaming exercise by spamming the enemy's capital ships with speedboats, USS Cole-style. Of course, the military's response was to change the rules to disallow Zerg rushes. Hopefully the Chinese, Russians, and/or Iranians got their updated copy of the rulebook.
He basically was trying to pull of a peasent railgun, and then got pissy when people told him he still had to obey the laws of physics with his strategies whatever other rules the navy's scenario involved.
https://1d4chan.org/wiki/Peasant_Railgun
The idea of "spamming the enemy with speed boats" as a tactic is over 130 years old at this point. It was called "the young school" of naval thought, or Jeune École in its native French. It failed spectacularly in the real world, because militaries need only invest in a few destroyers armed with rapid fire cannons and the entire plan goes belly up. A hundred speed boats were simply no match for one destroyer armed with machine guns.
Soldiers (and tanks and F-16s) have effective countermeasures. The difference is that surface ships do not have effective defenses (or will not, when the missile technology matures). Tech does become obsolete; it happened to boarding parties and battleships; aircraft carriers are 80 year old tech, the distance in time between the US Civil War and WWII, and they'll become obsolete some day. I sure hope my side isn't still depending on them when they do - that has been the end of many nations throughout history.
You may not believe it, but it's a pretty broad consensus among experts that I've read. Militaries are investing heavily in that outcome.
E pur si muove
20 cents of lead can kill a soldier. Are soldiers obsolete?
10,000 dollars of RPG can destroy an M1 Abrams. Is the Abrams obsolete?
A single SAM site can destroy an entire squadron of F-16s. Are F-16s obsolete?
Well...no. There is an ocean of difference between "can" and "will". Especially for something as insanely complicated as an anti-ship non-nuclear (read: needs a direct hit) ballistic missile (read: terminal course correction is going to be a bitch) trying to hit some of the fastest ships in the US Navy dodging like hell while being covered by a blanket of AA fire the likes of which the world hasn't seen since WW2.
There is a very good reason China has recently started constructing its third aircraft carrier, and it's not because it looks pretty when you hang it over the fireplace.