This can be bowel infection, or, small bowel bowel overgrowth.
Irritable bowel syndrome can act like this, and is more likely when occurring only later in the day.
Infection would be all day.
Parasites can act like this as well.
Inflammatory bowel disease can act like this.
So can diverticulosis/itis
You need an exam, and a stool analysis.
OK, so you might have more questions or want to give me more information: Please use reply to expert if you have further questions. When you are ready, please click a positive rating [hopefully excellent—that’s how we are paid, per rating]. If you forgot something, come back. I am here daily.