My employer uses vanguard for my 401k and it buys stocks and bonds automatically using my monthly paycheck contribution. It accused some interests and dividends throughout the year. I did not withdraw from these accounts.
Interest and dividend income generated within the retirement plan is not taxed. You only have a tax liability when you withdraw from the plan.
Some states do tax such income, however, when generated within an HSA.