You can name a charity as the beneficiary of your IRA or 401(k) by completing a designated beneficiary form from your plan provider. Although withdrawing funds and donating the after-tax amount is an option, it often results in minimal tax savings. https://www.federalpensionadvisors.com/post/beneficiary-for-401k-chairty