Sure, we all have memories. We all remember being seven, and ten, and thirteen, and sixteen. But never again will we be able to insert ourselves into that childhood/teenage mindset. Now, I am still a teenager, and thus I still have access to the mindset of my YA characters. But that soon will change. With time, I will no longer be able to think and feel like a teenager thinks and feels. Having a memory of childhood just isn't the same.
As writers, we strive to recreate these mindsets as best we can, although it will never be possible to recapture childhood. During my last few years as a teenager I've done my absolute best to write everything down. I record my feelings and my petty desires and all the ups and downs of high school/early college. Hopefully, in a few years, I will be able to look back on these writings and use them in my professional work.
But what about those people who are already adults, who have crossed that bridge? What if you possess no written recordings of your thoughts as a child? Many of us don't think to save these childhood scribblings, and thus we lose this temporary window to our younger selves. This is why it is so, so important to integrate yourself with your target audience. If you are writing for teens, you cannot expect to rely solely upon your memories, because memories do not really allow you to think like a teenager. When a frustrated thirteen-year-old yells "You don't understand!", in many ways, they're right. Yes, we were all thirteen at one point in our lives, but that bridge is gone. We cannot fully understand what it's like to be thirteen because we do not have the power to shift into the mindset of a child.
So you must take every opportunity possible to spend time with your target audience. Really listen to them, and take the time to ask about their thoughts and feelings. If you compile your own memories with these careful, thoughtful observations, you can craft a character who is as close to a real teenager as possible.