The Tombs of Atuan by Ursula K. Leguin

Goodreads Storygraph

"When young Tenar is chosen as high priestess to the ancient and nameless Powers of the Earth, everything is taken away - home, family, possessions, even her name. For she is now Arha, the Eaten One, guardian of the ominous Tombs of Atuan. While she is learning her way through the dark labyrinth, a young wizard, Ged, comes to steal the Tombs' greatest hidden treasure, the Ring of Erreth-Akbe. But Ged also brings with him the light of magic, and together, he and Tenar escape from the darkness that has become her domain."

...and so begins....um....I mean, so continues the Earthsea Cycle! And yes, ok, you should read A Wizard of Earthsea first -- don't worry, it's short (and good)! But, while Ged is a cool guy and all, Tenar is really where it's at. If you want to read more about the trauma of being Assigned Priestess at Birth and/or the trauma of being literally locked in a tomb, you need to read this!