When someone changes dramatically and without an apparent reason, the first thing to do is to check with a medical doctor to make sure there isn’t an undiagnosed medical issue going on. I don’t think so in this case but it’s always wise to check.
I’m wondering if being in college with the much higher academic demands and different social expectations has been overwhelming to you. It is not unusual for young people who excelled in high school to feel swamped in the first year of college where they are no longer the best and the brightest. In college, you are surrounded by other people who were also the best and the brightest in high school. If your self-esteem has been built on being one of the smartest and most interesting people in a room, it can be daunting to find yourself as only one of many people who are also smart and interesting.
If that is possibly the case, it’s important to understand it and to set more realistic goals for yourself. You may not get top grades at first. You have to learn a new set of expectations and a new way to manage your studies. If you have difficulty doing that, see if there is a counselor at your school who can help you figure it out.
I wish you well.