Here’s a good article comparing a couple different studies: https://skepchick.org/2023/06/study-can-you-fast-your-way-to-good-health-maybe/
TLDR is it’s not conclusive, but you can ask your doctor about trying it out and as long as you don’t turn it into an eating disorder and starve yourself, it might be worth seeing how it works.