The lone pair of nitrogen opposes the dipole moment of NF3 while it is added to the dipole moment of NH3
In NH3
Hydrogen is less electronegative than nitrogen, so all the electrons will move towards nitrogen. Due to this, all the vectors will be in the same direction and the summation will come to maximum.
In NF3
Fluorine is more electronegative than nitrogen, so all the electrons will move towards fluorine. Due to this, all the vectors will cancel each other and the summation will come to a minimum.

In NH3, the dipole moment vector of the bond and the lone pairs are in the same direction. But in NF3, the dipole moment vector of lone pairs and bond pairs are opposite in direction. So, the net dipole moment will be the subtractive effect of the two. Hence, the dipole moment of NH3 is larger than NF3.