Fibre

Soluble fibre such as pectin, found in pears, apples, and prebiotics like inulin, galactooligosaccharides (GOS) and fructooligosaccharides (F.O.S.), are able to dissolve in water and form a gel-like substance, softening stools.
Insoluble fibre like cellulose, predominant in fruit, vegetables and whole grains, which adds bulk to stools, helping you poop.
Dietary fibre is found in plants and represents a range of carbohydrates that are indigestible by human enzymes. They go through the gastrointestinal tract mostly intact until they reach the colon where they’re either fermented by gut bacteria or used to bulk the stool