There is a reason why you feel emotionally connected to the songs you listened to as a teenager. Not only do you suddenly remember all the lyrics, but you can remember all the memories and feelings you have connected with each song even though you haven't heard it in years. When you experience that flood of personal memories, you are experiencing musical nostalgia.
The reason why people are so connected to the music they listened to as a teenager is that between the ages of 12 to 22 you are developing your own identity. While you are trying to build your sense of self you are finding music both on your own and with friends. During this time your brain is also developing very quickly. According to brain imaging studies when people listen to their favorite song their brain's pleasure circuit releases "dopamine, serotonin, oxytocin, and other neurochemicals that make us feel good," but when this happens to teenagers the music also gets "wired into our lobes for good."
Since this music that you listened to as a teenager was embedded into your developing brain more and more every time you listened to it, you feel nostalgic when you hear it again in the present day. Those times were packed with emotions that your pubertal growth hormones told your brain were super important, meaning that now you can still remember what you felt all those years ago, describes Mark Joseph Stern.
You stored all these memories of listening to music during your teenage years in your implicit memory. Your brain has two different types of memory, implicit and explicit. When a memory is stored in your explicit memory it is done on purpose while the memories you store in your implicit memory are done unconsciously, according to The BBC. Because you unconsciously put these memories into your implicit memory they are "often regarded as powerful" and "emotional, as well as durable." That way even as an adult you can hear that song from years ago and vividly remember how you felt when you listened as a teenager.