I have this from my post-concussion syndrome but it can also occur with cervical spine issues like C1/atlas or C2. Simply put, brain fog occurs because your spinal misalignment makes it hard for oxygen, blood, nutrients, whatever to get to your brain.
Speech therapy can help with mild aphasia. Lion's Mane may also help with cognitive support along with fish oil. I take both as needed. Curcumin also helped me a lot - it fights inflammation. That may help your brain and pain.