The best way to learn product management is by doing it.
Product managers need a wide variety of skillsets and experience in order to be successful. This includes technical knowledge, design thinking, product lifecycle management, business modeling and analytical skills. And since all product managers have different backgrounds, they all have different ways of learning this new skill. For some people it might be reading books on the subject or taking online courses; for others it could be getting a mentor or joining a PM community. What’s important is that you find the most suitable way for you to learn the necessary skills without wasting time and not being able to apply what you’ve learnt.