Hello! This response is kind of late, hopefully this has resolved. If it hasn't, you should take some time off from school. I'm recovering from a head injury that happened 7 months ago. I've been diagnosed with Post-Concussion Syndrome. One of my main symptoms is the brain fog.
You need to give your brain some time to heal. Take it easy, and return to your studies gradually. If you feel like your brain is starting to struggle, that means it's time to take a break.
Hope things get better for you.