This guidance is only relevant for people living in the US.
Other people have done comprehensive write ups, so I am not going to repeat it:
https://forum.effectivealtruism.org/topics/personal-finance
https://forum.effectivealtruism.org/posts/un8ZjtG3px8mWeAjJ/credit-cards-for-ea-giving
https://forum.effectivealtruism.org/posts/GYcD5AzKsJeyHL6c3/using-the-tax-system-and-stock-market-to-donate-more-a-few
https://reducing-suffering.org/advanced-tips-on-personal-finance/
https://www.blackrock.com/us/financial-professionals/insights/donate-stock-to-charity-for-tax-savings
There are two things to optimize for:
Prescriptions:
A charitable contribution is a donation or gift to, or for the use of, a qualified organization. It is voluntary and is made without getting, or expecting to get, anything of equal value.