What you describe fits very squarely within Buddhism (a spirituality; no need for religion).
If you're interested, take a quick read of my forum post re:Buddhism back in 2019:
[Login to see the link]
I might not be the best example of a Buddhist; I live on the ocean and have everything anyone could hope for, including an amazing wife. Although I've been fortunate, I never forgot my roots of growing-up dirt poor. I have donated the bulk of the money I've earned to help others (humans and animals).
This taught me one very important lesson; something everyone can learn from:
Doing things for others is monumentally more satisfying and rewarding ... than doing things for yourself.
In addition, having compassion/empathy for others, and actively doing your best to ease the suffering of others ... is often the quickest way to overcome your own internal issues. It's counter-intuitive; however, it's a universal truth. In simpler terms, when you focus on helping others, it often does more to mitigate your own personal problems.
Don't believe me? Try it. Just once. Then report back with your experience.
If you're not sure where to look, I can provide a simple, pervasive example: Go to a public area. Find an elderly/lonely person that appears confused, depressed, or in need of help. Engage with them genuinely. Not superficially, but genuinely take an interest in them and talk to them like your best friend, with true interest in their words.
Warning: If you have to fake the interest or you can't genuinely treat them like your best friend, ignore this suggestion.
You may run into some people who are not worth your time. That's common. Once you find the right person, you'll realize you've made a substantial difference in their life. Not only have you given them some joy, you've renewed their confidence and interest in others. When you find that deserving person, invest as much time as they require to help them.
Next... Pay close attention to how you feel that night, or a week later. Typically you'll feel better about that short investment in time, than other superficial pursuits. For example, you'll quickly forget about the $200 designer shoes, but you'll remember the good you did to help others, for years to come.
If you (or others here) are interested, consider it an experiment -- try it out and report back.