* Low refrigerant level. If the refrigerant level is too low, the AC system will not be able to cool the air effectively, and the engine will overheat. This can cause the engine to shut off to prevent further damage.
* Faulty compressor. The compressor is the heart of the AC system, and if it fails, the AC system will not be able to function properly. This can also cause the engine to overheat and shut off.
* Electrical problems. Electrical problems can also cause the AC system to malfunction and the engine to shut off. For example, a loose or damaged wire can cause the AC compressor to overheat and fail.
* Mechanical problems. Mechanical problems, such as a broken belt or a faulty expansion valve, can also cause the AC system to malfunction and the engine to shut off.
If your engine shuts off when the AC is running, it is important to have the problem diagnosed by a qualified mechanic. They will be able to identify the cause of the problem and recommend the best course of action.