Skin damage caused by the sun?

I’m 18 years old an I was just wondering if skin damage from being out in the sun can heal itself after a period of time after taking care of it. I’ve had some sunburns a few years ago and am worried about skin cancer when I get older. So can my skin repair what damage the sun has caused by taking care of it from now on? Should I be worried?