Deductions & credits

Depends what kind of accounts they were from.

If you paid investment expenses like safe deposit box fees or advisor fees you can deduct the amount OVER 2% of your AGI as an investment expense if you itemize deductions.  Go to……
Federal Taxes
Deductions and Credits
Choose Explore on my own or I'll choose what to work on  (if it comes up)
Then scroll down to Retirement and Investments
Other Investment Expenses - Click the Start or Update button

But if it is for a 401k or IRA account you can only deduct it if you paid it with money from outside of the account.

If the deduction is taken out of your IRA balance, it's not deductible.  If it's billed separately to you and you pay it with your own funds, it's deductible as a miscellaneous deduction on Schedule A. And then only the amount over 2% of your AGI is deductible and then only if all your deductions are more than the Standard Deduction.