The number one thing to remember is that professors are people too, and sometimes we respond less than graciously even when we should do better. The response you got may not have been about you or your question at all. Maybe you were the 15th email of the day, maybe the professor didn't sleep well the night before, maybe they spilled their coffee and ran over a squirrel on the way to work. You just never know what was going on before that email was written. So that's the first thing - don't let a dismissive or unhelpful reply stop you from reaching out to your professors when you need help, because often the way people respond to us isn't about us at all, it's about them and their mood and frame of mind.
Next, let's talk about the things that are in your control.
One important thing to do, when emailing your professors, is make sure that you are being really clear in that email. Professors get dozens of emails a day and are not always giving their inbox their full attention. When you send an email, remember to tell the professor: who you are, what class you are in, the specific assignment that you are struggling with, and ask your question as clearly as possible. The more clearly and specifically you write your email, the higher the probability that you will get a helpful response.
But what if you still get an unhelpful response? My more specific piece of advice then, is to think about what other resources you can rely on to get the help you need. Can you ask a classmate? Go to the library and ask for a librarian's help? Perhaps it is something that the writing center could help you with? Is there a Graduate Assistant for the class who you could contact? Think about all the possible avenues and resources available to you and make use of those.
It's really important to understand the network of people and the wide array of resources that exist in a university environment. Making use of all of those options will make you a better student, and you can hone your creative problem solving skills. Because unfortunately, you will encounter unhelpful people and roadblocks on a regular basis for your entire life. Professors should be helpful, but when they're not (which is unfortunately the reality sometimes), there are almost always still ways that you can get the help you need.
TLDR: Don't take unhelpful emails as a reflection of yourself, keep on reaching out, keep on asking for the help you need, and make sure that you know how to advocate for yourself and find help from other quarters when necessary!