In the manga and anime "Death Note," when Light Yagami relinquishes his memory of being Kira (the vigilante serial killer), his entire personality changes due to the loss of the memories associated with his time as Kira.
The key reason behind this change is the influence of the Death Note itself. The Death Note is a powerful notebook that grants its user the ability to kill anyone whose name they write in it, provided they know the person's face. It also allows the user to manipulate the time and cause of death. When Light first discovers the Death Note, he becomes consumed by its power and adopts the persona of Kira to "cleanse" the world of criminals, in his view, creating a utopia where crime does not exist.
However, as Light uses the Death Note more frequently and becomes engrossed in his role as Kira, he becomes increasingly megalomaniacal and obsessed with maintaining control and power. The Death Note's influence starts to erode his sense of morality and empathy, turning him into a cold, calculating, and ruthless individual.
When Light relinquishes his memories of being Kira, he effectively erases the memories of his actions as the mass-murdering vigilante. This means he no longer recalls the atrocities he committed, the people he killed, or the mindset he adopted during his time as Kira. As a result, all the changes in his personality that were influenced by his time as Kira are effectively undone.
After losing his memories, Light returns to being the bright, talented, and ambitious student he was before discovering the Death Note. He becomes more empathetic, caring, and exhibits the qualities he had in the beginning of the story. This transformation highlights the profound impact the Death Note had on his psyche and how the loss of those memories allowed his original personality to re-emerge. However, even after losing his memories of being Kira, Light's intellect and cunning remain, making him a formidable character throughout the series.