Strength Training vs. Endurance: Which Builds Better Mental Resilience?

I’ve always been fascinated by how physical fitness impacts the mind, especially mental resilience. There’s plenty of talk about endurance activities like running or cycling helping with stress and grit, but I’m curious does strength training offer similar benefits?

From a personal standpoint, lifting weights definitely feels like a mental challenge as much as a physical one. Pushing through heavy sets requires focus and discipline, but I wonder if it translates to resilience outside the gym the way endurance work might. Has anyone noticed a difference in how these two types of training affect their mindset? Would love to hear your experiences or any studies you’ve come across!