How to improve as undergraduate student doing research?
Being a burden is the sine qua non of undergraduate researchers! That's not a dis, it reflects the truth that the professor isn't having you in their lab for your abundant research output, but for your own education (and possibly so they can lure you in to joining them as a graduate student). After all (it's easy to forget sometimes) a professor's main job is education.
Therefore, don't worry about asking too many questions. Those are natural because you're in a situation where nearly every step of your work is new to you. The key thing you want to focus on is how to make it so the question frequency decreases with time. The gradual transition from undergraduate newbie to postdoctoral rock star of course has something to do with gaining additional domain knowledge, but it's just as much about learning how to learn, and learning how to work.
So part of your learning now should be a bit meta. In addition to &quot;how do I write a python script to do X?&quot;, your questions should also take the form of &quot;how can I solve this myself?&quot; &quot;before I go to Prof. X, have I googled? did I ask their other students?&quot; &quot;is this related to my previous experience, and, if so, how did I solve it last time?&quot;
I think as long as you are going to Prof. X with novel questions (and getting clarification counts as novelty), then you are doing your job just fine, and answering those questions (or helping you to answer them yourself) is them doing their job.
And to +1 what Buffy said, keeping a good notebook where you record not only your conversations with Prof. X and other members of their group, but also your own learning (like summaries of papers, results of experiments, key techniques you picked up) is a key skill to learn.