OP, here’s something that I’ve done that’s helped me in that regard. Every night when I pray, I always focus on what I’m thankful for. Normally that zeroes in on the personal blessings close to me (wife, family, friends, job, etc.), which is probably what most people think about when they think of being thankful.
But at least once a week, I make sure to focus my thanksgiving on the greater structural blessings of my life that I had no control over, such as being born in a mostly prosperous country, being born into the middle class, having parents that highly valued my education, being born into a relatively stable family, having no major medical conditions, etc.
As I really go through and examine those things, it cannot help but force me to recognize that 90%+ of people around the world would happily trade spots with me, even though, in my experience, I just live a normal, boring middle class existence. Focusing on that in prayer on a regular basis keeps my perspective correctly oriented (I hope!).