Let's assume you're a junior SWE in the Bay Area, making $130K. Annual take home is ~$85,753 according to [1] You pay $3K in rent (nice 1 bedroom apt in South Bay, or just a decent one in SF), $2K for various expenses, that's $60K and you're left with $25K.
This is for a junior engineer, and granted they might want to save $25K vs $15K (arguable; I would consider those savings don't matter much in the long run, the goal being to quickly increase your salary by advancing your career), but an engineer in a large tech company is making closer to $250 - $300K total comp, and you'll see that the $10K donation isn't making much of a dent in your savings at that point.
[1] https://smartasset.com/taxes/california-paycheck-calculator#...
Those charities aren't going to help you when you're retired and subsiding on a meagre state pension. Or if there's a resurgent global pandemic and you lose your job and home.
Save first, always.
Absolutely for saving to be able to survive ~1 year as life is very unpredictable, but we're talking about altruism here... Let's for a second assume we all want to have the largest positive impact on other people, is that $1M really the best way to spend your money to both improve your and other people's life? Could you instead buy a house/work elsewhere, pay $400K, and invest $600K in saving a hole bunch of people from certain death / extreme poverty?
If you're very frugal, you'd end up giving away a very small amount of money, saving all the rest... Saving is super important, but giving money to effective charities is also a great way to use your money.
To take a typical example of someone that might be reading HN, any software engineer working in NY or the Bay Area can easily give away $10K a year while saving enough money to get a very cozy retirement.