There are two (or three) types of shields in the Star Wars universe: ray shields, particle shields, and "concussion shields." I've not personally experienced the difference between a "concussion shield" and the others, but the difference between a ray shield and a particle shield are discussed in the original Star Wars.
Only a precise hit will set up a chain reaction. The shaft is ray-shielded, so you'll have to use proton torpedoes.
Capital ships battle each other with massive waves of turbolaser attacks and missile launches; the other ship scatters the turbolasers with ray-shields (which wouldn't be an impediment to proton torpedoes).
That's all canon. But canon doesn't discuss particle shielding, so I need to dip into Legends. The good news is that the Legends explanation makes sense.
Particle Shields blocked EVERY physical object, from both directions. To launch fighters or even their own missiles, the particle shields would need to be down. You'd only bring them up in heavy debris, or when you cease launching ships/weapons, or for very specific areas (like the bridge, where you would have strong particle shields).
In short, during active combat, Star Destroyers depend on localized shielding around weak points and their armor to protect themselves from combat damage from particle-type weapons. The ray weapons are kept at bay because they could tear through the armor, letting the missiles get to the juicy bits inside.
The Hammerhead corvette strikes the Star Destroyer, which was both disabled and still in combat, amidships, where there would be no particle shielding. The other ship, still being in combat, likely had it's particle shields down.
But for some reason, the Star Destroyers were orbiting criminally close to each other! Once the active Star Destroyer realized they were about to be rammed by the other ship, they had no time to generate a strong particle shield, even if they were in a frame of mind to give the order. The maneuver was completely unexpected.
Even if they had thrown up a particle shield, the particle shield would have to deflect a 1.6 kilometer long vessel. It's not designed for that. Missile banks, sure. Starfighters, no problem. Star Destroyers ramming you? Not on your life.
The planetary shield they run into is also a particle shield. It's why the ships couldn't get through when they closed the ring. Two star destroyers smashing into that brought that shield down, so I'd expect one star destroyer to be plenty to tear through any particle shield that the other ship could throw up.