I read this book in the 80s and I'm going crazy trying to remember more of the story. A group of teenagers are sent on their Rites of Passage. Only one member of the group survives the ordeal, but is contact with an individual who has partially block the memory of the ritual. This helps prevents the elders from scanning the teenager and learning how they survived the ritual alone.
Sounds like the Tripod series,
The story of The Tripods is a variation on post-apocalyptic literature. Humanity has been conquered and enslaved by "the tripods", unseen alien entities (later identified as "Masters") who travel about in gigantic three-legged walking machines. Human society is largely pastoral, with few habitations larger than villages, and what little industry exists is conducted under the watchful presence of the tripods. Lifestyle is reminiscent of the Middle Ages, but artifacts from later ages are still used, giving individuals and homes an anachronistic appearance. Humans are controlled from the age of 14 by implants called "caps", which suppress curiosity and creativity and leave the recipient placid and docile, incapable of dissent. People who are capped are happy to leave home and serve the tripods. The caps cause them to worship the tripods. Some people, whose minds are broken (instead of successfully being controlled) under the pressure of the cap's hypnotic power become vagrants, who wander the countryside. One of the books contains a discussion among Masters that "We should cap humans sooner, to reduce the risk of precocious people getting independent-minded soon enough to try to evade being Capped, but we cannot, because we cannot Cap them until their braincases have stopped growing."
Which if it isn't The Tripod, I do recommend reading it. It was the first scifi book I ever read and really got me into reading as a young adult.
As Ximena indicated in their somewhat sparse answer, Watchstar published by Pamela Sargent in 1980 does indeed fit.
Alone in the desert, Daiya is faced with dilemma that will determine her fate. If she can successfully resolve it she will join the Net of her village, but if she fails, her life will be spent with the feared Merged Ones. Confused and torn between worlds near and far, Daiya harbors a secret of her people, and must find a way to move beyond her discoveries to a safe place where she can survive.
Daiya encounters Reiho, a boy whose society, which branched off from Daiya's society in the distant past, now resides on a comet. He has descended to the planet in a spacecraft, curious of what happened to their former home.
And indeed, she erases her memory of him to protect him.
There was a mental discipline which could help her, but she did not know if she had the ability to make it work. It was a discipline used only in rare cases, when a person had suffered so grievously that only temporary forgetfulness could heal the hurt. She could take her memory back to the time when she had first seen Reiho’s craft, then, carefully, erase every trace of him. The memories would return if she saw Reiho or anything that reminded her of him, but that could not happen; he was not coming back. The comet would seem only what it had been before, a mysterious omen.
However, she encounters him again and it is during that time that she decides she will never be able to share the secret of him.
“You must understand that I can’t. They would not believe me. They would look into my mind and decide I was the victim of a great illusion, that I had grown so separate I could not be allowed to live, that I had shown them a …” She broke off. The boy was distracted, still looking around the great corridor, sneaking a peek through the railing at the gold and crystal pillars below. “Why don’t you go?” she asked.
Ultimately, Reiho leaves, after revealing that her world is underlaid with more technology than was commonly believed, but he also teaches her to telepathically connect with the technologically merged minds of his people, the Homesmind, and that leads her to find a similar machine on her world.
— Let me leave here — she pleaded.
No, Homesmind said, and she knew the minds would not swallow her and strip her of herself. Your own world calls, and you have not begun to understand it. But I shall watch over you .
The other minds were gone. She stretched out her arms, clawing the air. Daiya rubbed her head, then lay down, gazing up at the night sky. She would build a hut, but she would rest out here so that she could look up through the trees and see the stars. Above her, the comet shone.
A wisp touched her, a slender bond. It caught her mind and held her. It was another Net. / We are with you / said the minds under the mountains. She would not be alone.