I read a novel in my early teens (around 2000) in which the main character is a teenage girl who lives in a dystopian world where she lives with other girls of teen or younger age in somewhat boarding/communal style living. I remember they have numbers as their last names (Lucy 5, Amy 3, etc) and there's some kind of music or messages playing over speakers that keep them somehow controlled or complacent.
The memory of families has been extinguished. The main character sometimes wakes at night to silence and remembers things from the past that she puts on paper and hides in a bathroom wall. There is a queen or mother figure also used as part of the control, represented as a statue.
The girl somehow escapes or is ejected along with a boy (who was housed separately) and goes out into the real world and remembers the past more and more including her family and being taken from them. I remember she goes to her childhood home and all the food is rotten and she meets up with free people but that's about it.