My professor said no, what did I do wrong?

Don’t be so hard on yourself. Sometimes labs simply do not have the time or resources to help undergraduates get started. The lab may have a lot of graduate students leaving, and are taking on new graduate students. The lab may also already be hosting a few undergraduates already. Generally, your professor will give you a reason if he denies your request.

Getting a job in research: A few suggestions