Right now, as a resident, you are likely in the lowest tax bracket of your career. That fact creates a window. It is open for a few years. It closes the day you become an attending.
Here is the math, briefly. Your retirement contributions can go into one of two flavors of account: a traditional one or a Roth one. Traditional gives you the tax break now, and you pay the tax later, when you withdraw in retirement. Roth is the reverse — you pay the tax now, contribute money already taxed, and it grows and comes out entirely tax-free.
Roth wins when your current tax rate is lower than your future rate will be. As a resident, you are about as deep in lower than future territory as you will ever be. Paying the tax now, at the resident rate, in order to never pay tax on decades of growth — that is, mathematically, a very good trade.
Two things change once you are an attending. Your bracket rises, which weakens the Roth case — once your rate is high, paying the tax up front is no longer a clear win. And direct Roth IRA contributions phase out as your income climbs, and disappear entirely above an income limit; past that point, funding a Roth IRA takes a backdoor workaround. A Roth 401(k) or 403(b), though, has no income limit — that stays open at any income. The simple, low-rate version of this move is the one you have right now — and it ends the day you finish training.
What to do, practically. For most residents, direct your retirement contributions to the Roth option — the Roth side of your 401(k) or 403(b), and a Roth IRA — every year you are in training. If your situation is unusual (a high-earning spouse, an unusual income year, anything that puts you in a higher bracket than expected), it is a fair question for a fee-only fiduciary advisor.
The cost of getting this wrong is not dramatic in any single year. The cost compounds. A few years of Roth contributions during the residency window, and four decades of tax-free growth on them, is the difference between two materially different retirements.
You have a window. It is open now. It closes.