2 things can be true
Exercise can definitely help with feelings of unwellness and depression. For me personally when I can bring myself to do it, exercise helps me feel better to an extent.
This is also an easier said than done thing while you’re depressed. Not only is it not a 100% guarantee you’ll benefit from it. Everyone’s different. But getting yourself in the mindset to exercise when you’re in a deep depression is almost impossible. Sometimes you can have enough self awareness to know when a depression episode is kicking in. As someone who’s bipolar I can usually tell when my manic lows are coming. Exercising before it fully it’s can ‘sometimes’ be beneficial when the low kicks in fully and I’m not as tapped out. Most times it’s no good.
This is very subjective but it’s not to be dismissed entirely. It’s not a cure or a full proof solution. But it’s a good suggestion if you can acknowledge the former