While genetics play a crucial role, environmental factors also contribute to ASD. Prenatal exposure to certain substances, maternal infections, and complications during pregnancy or birth can increase the risk. However, the interaction between genetic predisposition and environmental factors is complex and not fully understood.