Eat less calories than your body requires and you will lose weight. If you ate 5000 calories of salad you’d gain weight but if you ate one snickers bar a day you’d lose weight. It’s 100% about your calorie intake.
Google bmr and find out what yours is. Then eat less than that.
After fasting, you won’t feel the need to eat as much as you did previously. I’ve yet to pass 24hrs on waterfasting, but I’ve fasted 2weeks on Ramadan, not the same as waterfasting though, but I lost 3-4kg back then, now I’m aiming for 7days on waterfasting.
I do intermittent fasting where I fast one day and eat the next. Basically, I lose weight from not eating on a fast day and then I try to aim to go about 1000 under my BMR and exercise too on days I eat. I lose about 3ibs a week doing this. (I started this with a 5 day 18hour water fast where I lost about 7-8 pounds of fat and then did this)