Several measures can help prevent E. coli infection:
Practicing good hand hygiene, especially before eating and after using the restroom. Cooking meat, especially ground beef, to a safe internal temperature. Avoiding raw milk and unpasteurized dairy products. Washing fruits and vegetables thoroughly under running water. Ensuring safe drinking water, particularly in areas where water contamination is a risk.