it is a bit different, when it comes to "여자", we are talking about "a woman" as a female. it doesn't matter she got married or not. Generally speaking, it is a female in term of biology. However, when we talk about "소녀", mostly she is a littl girl but we barely use that in spoken Korean.