the aircraft carrier still has big place in surface warfare. in WWII US carrier forces took on submarines and guided missiles (kamikazes) and survived.
That was 80 years ago mate when ASW weapons had to be fired within several hundred meters to be effective and not be shot down by CAP or AAA beforehand. The Target also had to be hit multiple times because the explosives in the 1940s wasn't very powerful.
Now there missiles that are effective 1000 miles away, are so fast they are impossible to intercept and carry so much power a single hit could destroy a CVN in one shot.
Cruise missiles have replaced the carrier.