The most fitting response to how the sentence affects the story is:
It foreshadows the palace becoming a prison later in the text.
This is because the imagery of the windows growing narrower and the mirrors becoming wider suggests a shift from freedom to constriction, indicating that the prince's obsession with his appearance may lead to his entrapment.