Pick the investment account by what the money is for, because the account decides how it’s taxed and when you can withdraw it. Use a 401(k) or IRA for retirement, a health savings account for medical bills, a 529 plan for education, and a taxable brokerage account for other long-term goals.

Source