@Isabella, I had a huge problem with this in college, I didn’t realize until much later that I had misophonia, and did not really have many good coping mechanisms. Couple that with being an auditory learner and I had a really tough time.
If I had to do it over I would definitely try and get some help from whatever department handles disabilities — get a private room for test taking, see if you can record the lectures to listen to later (without someone chewing gum, snacking, or whispering behind you), get any other help they might offer. Sitting in the front of the class is good for engaging, but the absolute worst for misophonia, so try sitting in the back of the class. Also, keep earplugs with you at all times just in case.