Ships can now be attacked from shore. That really hadn't been much of a thing since the era of seacoast forts. But that's changing. China has invested heavily in shore-based anti-ship missiles. There are now more things you can launch from a truck that can take out a ship. As seems to be what happened here.
Look at a map of western Russia's sea access. Choke points everywhere, most of them controlled by others.
And yes, Russia's sea access is surprisingly limited for a country which nominally has the 4th longest coastline of any --- largely along the Arctic ocean.
Look at a map of western Russia's sea access. Choke points everywhere, most of them controlled by others.