A March 2021 study by University of Georgia said, 

"Early life sugar increased Parabacteroides [a bacteria] levels, and the higher the levels of Parabacteroides, the worse the animals did in the task," 

"We found that the bacteria alone was sufficient to impair memory in the same way as sugar, but it also impaired other types of memory functions as well."

"We found that rats that consumed sugar in early life had an impaired capacity to discriminate that an object was novel to a specific context, a task the rats that were not given sugar were able to do," 

"Early life sugar consumption seems to selectively impair their hippocampal learning and memory,"