Recoil is the based on the law of conservation of momentum, and it is the reaction to the propelled mass. Free recoil equation:
MgVg = MbVb + Mp*Vp
The momemtun of the propelled mass = MbVb + MpVp
where:
Mb = bullet mass
Vb = bullet velocity
Mp = powder mass
Vp = powder velocity
Mg = gun mass
Vg = gun free recoil velocity
Average powder (in gas form) velocity is about 1/2 of the bullet’s muzzle velocity when the bullet exits the bore, but then there is a “jet” effect when it is free to rapidly expand and accelerate. For rifles the terminal velocity of gas is estimated at about 4,700 fps, for handguns a little less 4,000-4,200 fps. This is the value that you enter into the equation.
For a rifle caliber the powder is a very significant part of recoil, for handguns much less unless we talk about large doses of H110 in a 44 mag, etc.
For any given caliber, when you use a heavier bullet, with any type of powder the dose is smaller and this contributes to lessen recoil (to a very minor degree in a handgun).
Also, when you use a faster powder the powder dose is smaller than with a slower one, and this also contributes to lessen recoil. The recoil impulse is also shorter, and has less muzzle blast, all of which may contribute to less perceived recoil.
Now, in a 9 mm these effects are really minor, and other things like adding a little weight to the gun will have a much greater effect, as well as how you grip the gun, etc. Some shooters like a sharper, shorter, recoil, some the opposite.