God, it sounds like the lab you're working in is so toxic. As a current undergrad working in a lab, I promise you not all research labs are like this. The lab I'm in is so understanding and has never once made me feel not competent (even though I ask dumb questions sometimes and make mistakes, because humans make mistakes and we don't deserve to get yelled at for such minor things)-- I want to make it clear that I am not a research-y person by any means and while I personally don't believe I'm cut out for research, the lab I'm in has never contributed to this feeling in any way. My advice is to find a different lab (if possible) with a better, non-toxic work environment. If you still feel not cut out for research in this new environment without being yelled at or put down, I'd say it's just not for you and that's okay. But right now, any reasonable person would feel incompetent with the way that you're being treated-- it's not you, it's THEM.