Our guts operate on a quite separate nervous system. Learning more will help control gastrointestinal diseases
Gut as brain
Our huge gastrointestinal tracts operate their own nervous system, using neurons that follow different principles from those of brain neurons, according to recent findings:
Our approximately seven-meter long gastrointestinal (GI) tract has its own functionally distinct neurons. Since this enteric nervous system (ENS) operates autonomously, it is sometimes referred to as the "second" or "abdominal" brain. While the ENS controls muscle movement (peristalsis) in the gut and its fluid balance and blood flow, it also communicates with the immune system and microbiome.

Karolinska Institutet, "New fundamental knowledge of the 'abdominal brain'" at Medical Xpress (December 7, 2020) Paper.
The Karolinska researchers made progress in studying the little-understood second brain by mapping the neuron types in the digestive systems of mice. The human gut is estimated to contain an independent network of over 100 billion neurons that not only control digestion but work with the immune system to fight a constant war with hostile bacteria.

These neurons help account for the curious sensation of "butterflies in the stomach." As Michael Gershon, M.D., author of (1999) The Second Brain explained to psychologists,
Q Does the brain in our heads influence the "second brain"?

A Yes. Butterflies in the stomach arise when the brain sends a message of anxiety to the gut, which sends messages back to the brain that it's unhappy. But the gut can also work in isolation.

PT Staff, "Our Second Brain: The Stomach" at Psychology Today (May 1, 1999)
The "second brain" is not, of course, responsible for thinking or making decisions. But it probably influences our emotions strongly:
"The system is way too complicated to have evolved only to make sure things move out of your colon," says Emeran Mayer, professor of physiology, psychiatry and biobehavioral sciences at the David Geffen School of Medicine at the University of California, Los Angeles (U.C.L.A.). For example, scientists were shocked to learn that about 90 percent of the fibers in the primary visceral nerve, the vagus, carry information from the gut to the brain and not the other way around. "Some of that info is decidedly unpleasant," Gershon says.

The second brain informs our state of mind in other more obscure ways, as well. "A big part of our emotions are probably influenced by the nerves in our gut," Mayer says. Butterflies in the stomach — signaling in the gut as part of our physiological stress response, Gershon says — is but one example. Although gastrointestinal (GI) turmoil can sour one's moods, everyday emotional well-being may rely on messages from the brain below to the brain above. For example, electrical stimulation of the vagus nerve — a useful treatment for depression — may mimic these signals, Gershon says.

Adam Hadhazy, "Think Twice: How the Gut's "Second Brain" Influences Mood and Well-Being" at Scientific American (February 12, 2010)
Most research concentrates on the role the independent nervous system may be playing in the development of gastrointestinal diseases. Meanwhile, it turns out that "thinking with your gut" is literally something we all do every day — supported by an independent nervous system.