Yup. Works. I'd suggest looking at the types, which are basically schedules:
https://www.everydayhealth.com/diet-nutrition/diet/types-intermittent-fasting-which-best-you/
I'd also suggest looking into some charts that help you decide how much you can lose based on your height/weight/age/sex.
https://simple.life/blog/intermittent-fasting-by-age-chart/
Trial, error, stick to a schedule and it works; yes.