Making charitable donations with appreciated securities is a solid strategy. If you have owned the stocks or fund shares more than a year, you will get a tax deduction for their current value. In effect, the appreciation of the securities increases your tax benefit yet you never pay any capital gains tax.
If you are making charitable bequests as part of your estate plan, though, use your IRA. As a tax-exempt entity, a charity can withdraw money from the IRA without owing tax.
Your other heirs, then, will inherit a smaller IRA. They also can inherit any securities you own, if those securities have not been bequeathed to charity.
Suppose the securities are worth $250,000 when your loved ones inherit. They will have a $250,000 basis in those securities so your heirs can sell for $250,000 and owe no income tax. That will be better than inheriting a larger IRA and paying tax on all withdrawals.