Toddlers and privacy

Today I had an interesting conversation about kids and privacy. I’am curious what some moms think. What’s the youngest age that’s appropriate for a child to have their door closed fully or half way? Specifically when a child is neurodivergent? I would love to know what you think?