You’re actually doing great. The glamourous image of college parties and fun is mostly an illusion. College is stressful and dull and most people don’t really have a social life, because they have tests and term papers. The students partying are the ones on academic probation. It only gets worse from there when you get into the professional world. Real life is like that. If you think your grades are slipping now, imagine what your grades would be like if you were hanging around the party kids!
You have two years left, keep it up. It may help to go to the student health center and see a counselor. I suspect COVID isolation may be part of the problem. You’re NOT alone, I promise.