The need an export license to be able to work for a company in the US depends on the company and the job (including within the field machine learning applied to natural language processing: still depends on the company+job). It can affect both Curricular Practical Training (CPT) and Optional Practical Training (OPT). it's not needed for Iranian who is also a US lawful permanent resident (LPR). The hiring company takes care of everything but the Iranian hire needs to fill out a lot of papers for the export team.
This is echoed by Reddit user not_an_immi_lawyer:
Depends on your field. If you work in a sensitive field, especially around military, nuclear, robotics or AI, your employer may require an EAR/ITAR export license. Being an Iranian citizen, you have a high chance of being denied one. However, most jobs outside these fields generally do not require an EAR/ITAR, and you won't need one to work full-time for such employers.