This is a list of things I wish someone had told me at the start of my undergraduate.
Having to spend many hours on homework sets doesn't mean that you don't have the ability to do math or that you're doing anything wrong. In tough math courses, it's typical for assignments to take 10+ hours.
You can't always force mathematical intuition to come to you. The results you're learning in your courses came from many hours, days, and years of hard work by incredible mathematicians. Trust that if you keep working with the unintuitive math, it eventually becomes intuitive.
You're qualified enough to do research. You'll never feel ready until you actually do it.
If you're finding yourself very stuck and frustrated on a problem, be it in research or homework, take a break. It can be really hard to step away, but it'll help you be more productive and happier. Talk to others, such as professors, classmates, or research partners. Math is collaborative.
Math is hard. Everyone who does it feels frustrated, unmotivated, and uninspired at times.
Doing badly in a course is really not the end of the world.