Historically, ballistic missiles were not accurate enough to hit a moving a ship. Nowadays, they are.
It also used to be the case that SRBMs and MRBMs weren't able to acquire a target on their own - the plasma would interfere with radar, and optical sensors were completely unfeasible. However, it seems China and Russia managed to find a way to keep radar working.
That wasn't that big of a problem either, because a warship should be able to jam the radar, but last year the Chinese claimed to have managed to get optical guidance work on an MRBM (DF-21D).
It also used to be the case that finding large surface warship was unpractical, but modern satellites can spot them even from GEO while LEO SAR and optical satellites exploded in numbers, meaning that it's now possible to track large surface warships accurately around the clock.
If that is actually the case, and it seems likely, then unless the US Navy gets very good at intercepting ballistic missiles, the entire fleet, and perhaps even the entire concept of large surface warships, may become untractable.