Don't know what to do, need some advice

So over the course of this semester I improved my grades to A or A minus in all of my classes. My motivation was to make up for past mistakes and slacking. In one class in my major that is known to be very hard, I’ve been getting As in every thing. The professor was very impressed. So for this class, there was a paper worth 30% of my grade. I put so much effort into making the paper great. I handed in a draft and was told to elaborate more and the paper would be excellent.

So that’s what I did. I handed in the final and got my grade in an email today.

I got a D in the paper. She said she was very surprised that my work was not good and this will bring my grade down tremendously. I’m now very upset and feel like I just wasted my time this whole semester because it was all for nothing, also thinking of just giving up. what should I do?

I would book an appointment with the professor to discuss your paper and where you went wrong. It sounds like this grade came out of nowhere, so it will be good to understand where you went wrong to prevent future errors. It also sends the message that you genuinely care about understanding how you can improve. Perhaps the professor will even give you a chance to make up for it somehow through extra credit (but don’t push it, go in with the sole purpose of getting advice for the future).