If your taxable income was $50,000 and you donate $10,000, and (some other conditions) your taxable income would now be $40,000; same as if you managed to move the money pre-tax.
However. If you donate aprechiated capital assets, you get two benefits. Your taxable income is offset by the value of the asset, and the capital gains disappear. It's much better than selling the asset and donating the proceeds; and it's handy if you don't have good records for your cost basis.
https://en.m.wikipedia.org/wiki/NAACP_v._Alabama
That said, there are a lot of operational advantages to being a for-profit corporation. Chan-Zuckerberg is organized this way. Other nonprofits try to have it both ways where the for-profit entity operates the business while being owned by a nonprofit. It has not worked out great for OpenAI. Patagonia converted to this model recently.