That's not true. If the donation helps enable a societal outcome that you benefit from (i.e. a donation to a local environmental cleanup nonprofit organization results in a cleaner park for you to enjoy), then you can benefit. You can't derive an exclusive personal benefit from it, of course. If you did, it would be tax fraud.
Depending on how underwithheld you are, you can avoid tax underpayment penalties.