This is a huge case of, "Yes, but . . . ."
Yes, exercise absolutely can and does help mental health. It helps me a great deal. That said, exercise requires some level of time, energy, and focus. The key is to find a form of exercise that you enjoy or at least do not mind. If going to the gym is exclusively a chore, you will more likely fail. If exercising brings some ~~Internet~~ inherent reward, you will more likely succeed.
I love lifting weights, but I did not have the mental energy to put together a program or figure out how to work around big physical issues after cancer. I paid a trainer to help, and that eliminated enough of the focus needed that going to the gym became fun. Now I am transferring to running my own program because I have learned enough that it is not as big of a mental load. Along the way my energy has also increased.
Contrast this with running. I hate running. It hurts my joints. It hurts my lungs. Getting outside and running should be easier than a trip to the gym, but it is actually much harder for me because there is no inherent reward. It just sucks, and it continues to suck as I get better at it.
So yeah, exercise is great for mental health, even if it is not a cure all. This only holds true once you find something you enjoy. If you think you enjoy nothing, you are most likely wrong. Keep looking. Keep trying. Maybe you like walking. Maybe you like a specific martial art. Maybe you like biking, but only on a stationary bike in your living room while binging your favorite shows.
Find something that you enjoy doing that fits well enough into your life. That way on the days you don't want to start, you will anyway because you know it will be enjoyable once you are doing it.