The primary cause of RDS is premature birth. Surfactant production typically begins around the 24th week of pregnancy and increases significantly by the 35th week. Therefore, infants born before 37 weeks are at higher risk. Other factors contributing to RDS include maternal diabetes, cesarean delivery without labor, and genetic conditions affecting surfactant production.