How to grow a lifelong friendship with your kids

Admittedly I might be getting ahead of myself since my son is only 3, but one question that keeps popping up in my head is how do you lay a foundation for a lifelong friendship with your children?

Myself, and most of my peers, had a difficult stage in their late teens/20s where we were angry with our parents and blamed them for everything that was hard about our lives. (Knowing how much work and sacrifice it takes to raise a kid it's crazy to think of my 3 yr old yelling at me in 15 years lol.) Thankfully it passed by the mid-20s for most of us but the conflict stage almost seems inevitable. I couldn't say I'm super close with parents now that I'm in my late 30s and our relationships are pretty good.

I'd love to hear from any older dads, especially dads of teens/young adults, who have navigated these years and are good friends and confidants of their kids. Anyone got some good stories to share??