Ask your GP for a poo test kit.
In the last 3-4 years we have changed our diets drastically. I've had slow transit for years++ but the bloating became troublesome to the point of being unable to eat our evening meals.
Cutting out processed foods i.e. the monring croissant, bun, scone really made a difference. That mid-afternoon bloating became less. In November we were away which meant no muesli with milk: no bloating! Have gone back to two rounds of white toast with butter for breakfast.
Recently I ate too much pizza

not my best idea. Too much cheese, grease etc.!
MayB it's time for you to note down everything you eat/drink day/night for 5-7 days/nights to see if anything is aggravating the bowel. I know miss at least 1 day a week then the next it's twice ...... with 4 hours between each visit.
Let us know how you get on. True constipation is painful, aged 11 I suffered for nearly a week. [long story short 2 protect the sensitive

]