Carbohydrates – how much is too much?

Now that I’m not eating bread to eliminate flour – I’m craving carbs. And I don’t feel full enough without potato/ rice to last the fasting period. How do I incorporate enough carbs so that I am satiated; but not TOO much that I don’t lose weight?! I’ve tried intermittent fasting twice in the past and put on 2kgs each time. Possibly due to carbs or eating too much of the “wrong” foods during the 8hrs eating time! 🙏 thank you in advance