Congenital anomalies can often be detected through prenatal screening and diagnostic tests such as ultrasound, amniocentesis, and chorionic villus sampling. These tests help identify abnormalities early, allowing for timely medical interventions or preparations for postnatal care.