Many people take on difficult career paths because they want to do good. Doctors come to mind. If that is your goal though, be aware that you can do much more good without even sacrificing the majority of your life for it.

There is effective altruism, and it gets far too little attention. The Centre for Effective Altruism also has an excellent career guide at 80.000 hours.

For more discussion of effective altruism, I recommend Being Good and Doing Good with Sam Harris and William MacAskill.