Consider staying home if one parent genuinely wants to be the primary caregiver, your family can sustain on one income without chronic financial stress, you have access to social support that prevents isolation, and the career impact is acceptable to you.
Consider working with daycare if maintaining career trajectory and retirement savings is important, you need the structure and identity that work provides, your child would benefit from the socialization of group care, or your mental health is better when you have adult interaction and professional engagement. If you go the daycare route, you'll also want to think about how shared parenting duties work during evenings and weekends.
Consider a middle path. Part-time work, freelancing, job-sharing, or a compressed schedule can give you more time with your child while maintaining some career continuity. Not every family has these options, but when they're available, they can be a genuine best-of-both-worlds solution.