When I started running, I came across a statistic that the typical world-class runner had been running for about 10 years, and that's when most people could expect to reach their peak. This held true in my case as well, but I didn't think much about why this was the case.
It turns out, it's just not for runners. In general, people will get really good at something after about 10 years of practice, or after about 10,000 hours of practice. This is true for musicians, computer programmers, athletes, and probably even project managers.
One of my favorite stories is of the basketball great, Michael Jordan. After not making the varsity squad, he became one of the hardest working players, and it was this hard work that lead to his eventual success, not some talent he was born with. There's a term for this; deliberate practice. Deliberate practice is when you are focused on your technique, not just the outcome and you dedicate a lot of hours to practice. Feedback is also important in deliberate practice, to make sure you are moving in the right direction.
So how does a PM get this? Having a mentor or coach is a good start, they can provide that feedback that is part of deliberate practice. Getting feedback from your boss is also a good idea.