Actually, I had something similar happen to me on an assignment in my second year. I studied biomedical sciences and had an assignment in which I felt very confident in my work, to the extent that I actually sat down and started helping some of my peers who were struggling. I got 50% on this, and was shocked, especially after finding out that people that I had helped got 2:1s. It made no sense to me at all, so I emailed the module leader about this to appeal the decision. The lecturer re-read my assignment and decided they'd actually marked it incorrectly- despite this being their module (they're familiar with the topic). I definitely recommend an appeal, especially if you believe that your work is at a higher standard and your supervisor agrees as well.
In my case, I knew who my grader was, so I actually went and sat down with her. I asked her questions about why she came to the initial conclusion, and she must've realized that she'd made a mistake. I guess finding out who marked your assignment is the best course of action, so you can discuss the marking