Kids from loving nurturing homes will do well regardless of intact family or not. Churches can be part of that for religious people but aren’t a necessity. All families need a good support system, decent daycare or after care and a reasonable work schedule so parents aren’t too exhausted to do their best as parents. Plus some kids turn out bad due to drugs or despite having the best upbringing.