Here's a rule that's really easy to follow: don't ask a woman when or if she's going to have a child. It doesn't matter if she has no children or one child or ten. It doesn't matter if you're just passing the time of day or if you feel you have a right to know the answer. You don't. So don't ask. Just don't do it.
Here's why: that woman you're asking, she either wants a child or she doesn't. And either way, your question is not going to help.
Reason 1: She might be happy with the number of children she has (and that might be none)
Some women don't want to have children; some want to have one; some want to have more. It's none of your business. It's entirely theirs. Also, it's unlikely that your insistence that it's selfish to only have one child or unnatural to not have children at all will change her mind. The decision about whether to have a child or not is complex; chances are, your opinion isn't a huge factor.
While I'm on the subject, if she's got two children of the same gender, don't ask her if she's going to try one more time for a girl/boy. She will or she won't. Accept that she might be happy with what she's got. One of each isn't essential, you know. And another thing: if a woman says she's not having any (more) children, and then she tells you later that she's pregnant, you don't need to remind her of what she said before. People change their minds sometimes. Congratulations will suffice. This doesn't mean you should assume she'll change her mind, and say so. That's patronising.
Reason 2: She might be in the early stages of pregnancy
She'll tell you when she's ready. You might notice that she's not drinking, or that she's putting on weight, or that she looks queasy or tired or whatever. She might say, in an unconvincing voice, that she won't have a glass of wine because she's on antibiotics. You might even catch her throwing up her breakfast in the toilet. Be sympathetic, be kind. Don't ask. I repeat: she'll tell you when she's ready. That might be tomorrow, or the day of her first scan, or when she goes into labour. A related rule: don't ask a woman if she's pregnant unless you can see a baby emerging from her.
Reason 3: She might be struggling to conceive
She might have suffered a miscarriage. She might have just got her period again. She might have had a failed round of IVF. She might be handling things as best she can. But she can only take so much. And your cheery and inappropriate question might just be the thing that tips her over the edge. Of all the things you could be, you don't want to be the person who tips someone over the edge, do you? There are so many things you could ask instead. Whether she'd like a cup of tea, or what her favourite book is, or, if she's already a mother, how her existing child or children are getting on. Train your focus on the people who already exist, rather than the people who might.
Reason 4: She might not be in a position to have a child
She might be single. Yes, there are ways to have a child without a partner, and she might or might not have considered them. If she wants to discuss this with you, she will. She might be in a bad relationship. She might have financial problems. She might have health issues. She might be waiting until she's finished studying, or she's got to a certain point in her career, or she feels ready. You might think she's going to leave it too late. Keep that thought to yourself; it's not vaguely helpful. You can probably safely assume that she knows how old she is.
Women are enough, on their own, whether they decide to become mothers or not. So treat them like whole, full people, the way you do with men.