Most of the time people get rich by doing exactly what you want to do: help others. The capitalist way of improving life for everybody is to engage in voluntary transactions that benefits both parties involved in such transactions.
With that said, if you work for a company that produces, let’s say, TVs and help them make TVs more affordable and efficient you will help people that couldn’t have TVs before get access to it.
That’s how we got to the place we are now where most people in somewhat developed countries can afford a TV or a chicken sandwich without having to spend 6 months and thousands of dollars in the process of making it.
The good thing about freedom is that your own benefit is often dependent on benefiting others as well since alone we can achieve nothing.
If you are more interested in helping your community or bigger causes you can keep working for these same companies and save some money and use that money to help whatever cause you feel good about. Maybe even create a business in the future to increase the rate of what you can help others.
There are plenty of companies that are founded on the principle of turning a profit but also help the communities they belong to while doing it.
Making people rich don’t conflict with improving others people lives and helping your community.
You will be much more useful to society if you are doing good yourself. Otherwise you can’t help anyone. You have to help yourself first.