I want to activate a relay for a ammount of time if a flame sensor is true

Oh dear!
Cluttered void loop, a pointless timeout timer in void setup, and lots of stuff missing from your sketch.

A little bedtime reading for you…

Pete.