Size definitely played a part in it. The Supremacy was sliced like a knife (though the debris went crazy), so it’s clear that a collision results in a ship-sized puncture rather than completely atomizing the target as some people speculated.
There’s any number of other factors potentially at play too. The Supremacy’s shields were likely at low power or even off due to pursuing at max speed while firing volleys at their target, and the Resistance ship was close enough to collide during the start-up of a light-speed jump before properly entering hyperspace. Who knows, a second more of preparation by Hux may have foiled the whole thing.
Which is exactly why I, and others, dislike that line in TROS. As Hal9000 mentioned in his notes for his edit, the “Holdo maneuver” being extremely impractical in most combat situations should already be understood by the characters in-universe. The critical nerdy audience may say “why don’t they just do that all the time,” but the obvious answer is “because they normally can’t.” We didn’t get characters saying “why don’t we just kamikazee the Death Star at light speed” in A New Hope, and we didn’t need them to say that; they studied the building plans, they know how lightspeed works, and they came to a non-kamikazee solution based on their knowledge, and none of those details matter to the audience.
Not to mention the chipper delivery and naming of the move are horrible in context of the scene. “Why don’t we just commit a bunch of suicide bombings, like that admiral that had to make a split-second sacrificial decision in a horrible lose-lose situation? Mass suicide bombings is a good plan for us to come up with now, while we’re sitting safely at our base concocting a strategy for a future battle, with very few ships in our fleet, and no pilot droids who could do it for us, if droids’ programming even lets them do that. So who’s volunteering first?”
The line is purely an awkward, out-of-place 4th-wall wink to fans that hate that the maneuver even exists, so why even have the line at all to remind people?