We present magnetohydrodynamic simulations aimed at studying the effect of the magnetic field on the production of turbulence through various instabilities during the formation of molecular clouds (MCs) by converging flows. We particularly focus on the subsequent star formation (SF) activity. We study four magnetically supercritical models with magnetic field strengths \(B= 0\), 1, 2, and 3 \(\mu\)G (corresponding to mass-to-flux ratios of \(\infty\), 4.76, 2.38, and 1.59 times the critical value), with the magnetic field initially aligned with the flows. We find that, for increasing magnetic field strength, the clouds formed tend to be more massive, denser, less turbulent, and with higher SF activity. This causes the onset of star formation activity in the non-magnetic or more weakly magnetized cases to be delayed by a few Myr in comparison to the more strongly magnetized cases. We attribute this behavior to a suppression of the nonlinear thin shell instability (NTSI), which is the main mechanism responsible for turbulence generation in the forming clouds, by the mean magnetic field. This result is contrary to the standard notion that the magnetic field provides support to the clouds, thus reducing their SFR. However, our result is a completely nonlinear one, and could not be foreseen from simple linear considerations.