When you say "normally a straight A student" what does that mean?
A lot of students experience a type of academic wall somewhere around their first or second year of university. They find that what worked in high school in terms of getting high grades is no longer working for the challenging courses in university, or at least, it's not getting them the near perfect grades that they're used to.
There's a number of reasons for this. First, there's a bottleneck between high school and university. Particularly among the STEM subjects, you're now amid peers who almost all did very well in high school. The class anchors just didn't sign up.
Secondly, a lot of the material that's covered in high school is of limited depth. The classes in university contain a lot more detail and are designed to challenge the students. The studying techniques that may have been sufficient in high school are no longer sufficient to ensure you have a complete grasp of the material.
Third, there are a lot of social factors that can influence your academic performance: living on your own for the first time, financial stress, parties, commuting, a gamut of extra-curricular activities that you simply didn't have access to in high school, a new set of friends, dealing with room mates, romantic relationships, etc.
So before coming to the conclusion that you're not capable of comprehending the material, it's important that you try to assess your situation. You can't really do much about the first factor above, but the other two you have some control over. Look at how you're studying. Try to learn how you learn. Try new approaches. Put more time in. And figure out if any of those external factors are playing much of a roll.