Generally, experts recommend you eat more easily digestible foods when experiencing a UC flare. For example, you could eat:
Apple sauce
Low fiber fruits (bananas, cantaloupe, honeydew melon, and cooked fruits)
Cooked, seedless, and non-cruciferous vegetables (asparagus tips, cucumbers, potatoes, and squash)
Probiotics (such as yogurt)
Lean protein (fish, lean cuts of pork, white meat poultry, soy, eggs, and firm tofu)
Refined grains (sourdough, potato or gluten-free bread, white pasta, white rice, and oatmeal)
Water or drinks that help replace lost carbohydrates and electrolytes
Fruit juice with no pulp (avoid prune juice)
However, it is best to work with a registered dietician to help form a better plan on what foods you should avoid or limit. They will also help you find out what foods best suit your stomach when expecting a flare.