It’s because creatine is used by the body to convert sugar into adenosine triphosphate (ATP). ATP is what your body actually uses for energy inside cells for things like contracting muscles and nerve impulses (like in the brain for things such as “thinking”).
ATP can’t be made in the brain, instead it is made by muscles. That’s why exercise and higher levels of creatine are good for cognitive performance and memory.