questions are very important, they refine your understanding of something and fill in the gaps in it. but one should not ask spontaniously, i have tried it and most of the times i found it would have been better if i held on to the question for qutie some time.
in a learning process, we have some questions which are ahead of the time which would eventually be answered if we keep on learning/reading. other kind of questions are outright unneccessary and often distract you from the real issue you were working on.
so while questions are important, it's more important to not get carried away and switch context and get distracted. i usually create a questions.md file in my projects where i write down all the questions that come up in my head, and i wait for the right time to ask them. most of them get answered as i continue reading, some require a little more clarification and asking-around.