Effective altruism is a useful way to go about giving back to society
Whenever professionals and corporate executives tell me that they are considering volunteer work or a career switch in order to “give back" to society, I advise them to continue in their current careers and donate money to promising non-profit organizations instead. This is often not what they want to hear, but is based on sound economic reasoning. If you have a comparative advantage in developing software and making money, it is better that you do that than social work. Everyone is better off if you earn more money and give away a portion of that to someone who is better at, say, administering deworming tablets than at building apps.