There’s reasonable evidence for fasting to kickstart diabetes treatment and for some gastrointestinal illness, I wouldn’t count on it for anything else though, and even for those I wouldn’t go for it without talking to an actual doctor.
I heavily recommend that you don’t rely on fasting to cure random illness, nor base yourself on anecdotal evidence on the internet.