Has your mental health gotten better when you just started exercising more?

I'm just curious like those who were dealing with anxiety, shyness, insecurities has this sorta symptoms reduced in a way once you started exercising.. I feel like me living in isolation and constantly surrounded by 4 walls has made me live more life in internal world and I'm just sabotage and ruminating more and more. I feel like I should go outside the external world to expand my mind and experience life. Anyways, I'm realizing I kinda feel good lifting weights and moving around more. My mood seems to change and I kinda just feel more positive and confident in myself. But it's this constant thoughs that bring me down the most and I'm trying to like figure out how to stop putting attention on that