DepYou could attempt the non-selfish kind and just donate it all to an independent health/rescue org like Red Cross/Red Crescent.
You could also go the kinda-selfish route like Alfred Nobel, known in his time as the merchant of death. Make an elaborate award&grant giving scheme for exceptional contributions to society in a variety of fields; boosting said contributions for many years. Would only recommend this route if you've got more than enough coin to spare, as the overhead of ensuring ethical operation is significant.
If you've got a house, you could transfer ownership to a trust/foundation/housing coop, to make it available for living at below market price.
I'd donate to various free software & open hardware projects important to societal improvement; like Mozilla, certain fediverse projects, PostmarketOS, Fairphone, etc.
Also anarchist orgs.