Size matters a lot, why did TB have the biggest defense in the NHL when they won two Cups?
Now with the rule changes, big D-man who can't skate struggle to get back into position, but if they're mobile, it comes down to IQ, whether they can anticipate and take the right angles. If you're really big and have above average speed and agility and combine that with spatial awareness, you have a chance to be a shutdown D-man.
Where size comes into play on defense is clearing the porch, blocking a PF rushing the net, and winning board battles to stop the cycle. Smaller D-men often get "walked" into the blue paint. Reach also matters, if you're 6'7 with a stick commiserate with your height, you're going to be able to contest plays with stick work.
For forwards, setting screens, winning board battles, delivering the wood on the forecheck, etc.
Now smaller players can compensate, and some do, but a lot don't.
Speed allows you to get into position on defense and pressure the defense on offense.
Knowing how to use leverage can even the score to some extent, but physics still comes into play (force= mass x acceleration).
Stick work, watch Cates in a scrum come out with the puck on a consistent basis using leverage and stick work.
And you need "true grit," just compare Frost and Barkey.
But all things held equal, big men beat up small men.