Short Answer
Brain fog is a symptom, not a diagnosis. It tends to appear when several systems drift from their own baseline at once: most often inflammation, energy metabolism, the gut microbiome, sleep and sex-hormone signalling. Some of these you can measure at home; others are GP organised blood tests.