The instant two balls collide, their mass and velocity are used to swap momentum between them, so the heavier ball is pushed less and the lighter one bounces off harder.