He's endorsed MacAskill and communicated with him on this very topic. He's pledged half of his wealth toward bettering humanity on Earth, and half of it to furthering humanity on Mars. https://www.nytimes.com/2022/10/08/business/effective-altruism-elon-musk.html
https://www.inc.com/kelly-main/elon-musk-philosophy-optimism-longtermism.html
And he spoke at the Effective Altruism Global conference. https://www.huffpost.com/entry/elon-musk-google-effective-altruism_n_55a56626e4b04740a3de3130
What about SBF, he gave away 1% of his wealth before he lost it all