Depends upon the intensity of the effort as well as time exercising.
Pootling about for hours in your Zone 1 taking in the scenery doesn’t require much apart from extra hydration and a normal daily dietary intake supplemented by a small regular snack here and there, nothing special, the longer you are out.
But once you start placing larger demands on your body you will burn fuel much more quickly and need to increase the amount accordingly.
Some days I’ll do 4 hr rides on just water and a decent breakfast.
Others I can be consuming an energy gel every 20 minutes or so and going through bidons of water supplemented with electrolytes.
No different from anything else that requires fuel: the greater the effort, the more you will need.
Weather will also have an affect upon our intake - especially hydration and salt replacement.
GCN have a cyclists cook book that has some really good recipes. Personally, I struggle with solid food if doing high intensity rides and so I prefer gels but slower endurance rides and I’ll carry a banana or two plus Haribos and whatever I have pocketable.
I hardly ever stop at a cafe though. Hate to stop. Don’t like coffee and won’t eat cake on a ride