I never even think about asking something like that to someone.
If I know them well enough and the setting is right I might ask if they desire more or what the ideal family size is but never a “WHEN are you” or “WHY haven’t you” or offer unsolicited fertility or moral counsel. Just don’t see how that is ever okay.
Of course, I was born as a result of people offering birth control advice only for my parents to become pregnant unexpectedly and find out the couple was infertile.
I should track them down and thank them sometime.