Theoretically, you can. Drop a nuke right on top of it and I don’t think it will be a functional carrier anymore.
The problem is “how do you know where and when to drop that nuke so you hit a carrier?” and “can I get in range to drop that nuke in the first place?”
In video games this is very easy. It shows up on the map and you can instantly click to attack it. In real life, there will be time lag and by the time you’re ready to strike, the carrier might be somewhere else already. Tracking even a giant ship like a nuclear carrier in a water body the size of the Pacific is pretty much finding a needle in a haystack.
And the needle can move to evade you. And drop a few fake needles to distract you. And the needle has many friends who will try to cut your fingers off as you reach into the haystack.

In fact, the needle carries smaller needles loaded with poison that will seek your hand even before you touched the haystack. And there will be more than one needle moving around, all of them will have the same defensive capability.
If you managed to get past all that, then sure. But getting past that is going to be very costly. And you have to repeat this for all the other carriers too, not just one. So maybe you got them all but you won’t have either hand left at the end, so who wins?
