I've been fortunate to have great mentors at work - those that have coached me through work issues, raises and promotions, politics, and more. I would highly recommend having someone at work to be your mentor - either formally or informally.
But it's not about having a work mentor and having a coffee every once in a while. You have to approach the relationship in a proactive manner.
Be proactive
Your mentor, unless it's a rare one, isn't going to help you figure out what you need to know. You have to assess your situation, reflect on it, and then ask the right questions to get the most invaluable insight into your topics.
Have a purpose for every session you have with your mentor. What are you trying to get out of it? What problems are you facing that your mentor can help with? And then whatever your mentor says, put in the work. If they recommend books or articles, read them and then figure out how to apply them to your situation.
Identify what they do (and don't do)
It's easy to see what things your mentor does and to copy them. What's more important, and often missed, are the things your mentor doesn't do.
What questions does your mentor never ask? What mindset does your mentor never have?
Help them with their agenda
Early on, you might not feel like you have anything to offer. That's okay. Continue the relationship and later on, once you've built the skills and experience, figure out what your mentor cares about. What problems are they facing? What small tasks do they not have time for? Help them clear the way. Ryan Holiday calls this the canvas strategy.