what is the role of mass in newtons second law?

Force = rate of change of momentum

momentum is p = m * v
so force is rate of change of m * v
if m is constant which is generally the case until you get to relativity then
force = m *(rate of change of velocity)
rate of change of the velocity of the mass is the acceleration of the mass, a
so
F = m * a