Start by first doing research. At least google your question or learn a little about the person you’re going to ask. If you make an ask to the wrong person, your ask will go nowhere.
Once you’re positive you have the right person, ask someone who knows you both to make an introduction. If you don’t have such a person, you’re making the wrong ask to the wrong person.
Once you have the attention of the askee, ask whether your assumptions are true. If you ask the wrong question to the right person you’re wasting everyone’s time, and you and the peer that introduced you look bad.
Once you’ve validated your assumptions or corrected them, seek to understand where the askee is coming from. Sometimes they will tell you, often you must at least partially guess. The better you understand the askee, the more context you’ll derive from your ask and the better your follow-up questions will be.
Once you have your answers and info, decide what clarity you need to seek in your follow-up asks. Once you’re done engaging, be sure to thank them. Bonus points for following up later with info about how their answers helped you.
Asking is hard work, and it means more than just writing a great subject line or neatly organizing the body of an email. It is not transactional, and it is unlikely the answer to your ask will immediately result in the outcome you want (unless your expectation is simply meeting a new person or learning something).
If you’re not asking correctly, you’re pitching. In a pitch you’re fighting against statistics and the chances of your pitch landing are very low. The chances of you annoying people are very high. The chances you learn anything are almost nothing. And the chances that you create a mediocre perception of yourself are almost certain.
By all means, make the ask. But do it with a thoughtful approach. It is the only way to get an answer that will lead you to the next ask.
If you do this well with consistency, one day you will be in a position to be asked. At that time you’ll understand why asking thoughtfully is so important. If someone isn’t good at asking, you’ll have a hard time answering them because they aren’t you, they don’t have your experience, and aren’t lucky in the same ways that you were. But if they are good at asking you’ll be glad they asked, and flattered that such a thoughtful person sought them out in the first place.