The trolls can help the young princess this time around, but recommend all magic is not only removed from Anna’s head, but from her memories too. While she is left with fond memories of playing with Elsa, all remnants of Elsa’s magic is erased from her brain. The King and Queen separate their daughters from coming in contact with each other too. For most of their lives, Elsa remains on one side of the castle learning to control her powers, while Anna is lonely talking to the paintings on the walls on the other side. The gates of the castle are locked to the public as well. Then, one day their parents die in a shipwreck.
Article source: https://www.cinemablend.com/news/2485348/what-you-need-to-remember-about-frozen-before-seeing-frozen-ii