The Immigration Act of 1924 (Johnson-Reed Act) established national-origin quotas that severely restricted Southern/Eastern Europeans and banned Asians. Mexico was exempt from the quota system because it was in the Western Hemisphere.
However, the Act did impose new restrictions on Mexican immigration:
In practice, Mexican labor remained in high demand (especially agriculture, railroads, mining), so large numbers continued to enter legally as temporary workers or outside the quota. The 1924 Act marked the beginning of regulated, bureaucratic control over the U.S.-Mexico border, shifting from virtually open to administratively managed migration.