401(k)s and HSAs are tax-advantaged accounts that allow you to save pre-tax dollars and lower your taxable income. Max these out. Put everything in VOO. Max your Roth if possible and put it all in IBIT.
But maybe you meant actual loopholes. Those are usually reserved for people who have tens of millions in assets. They can take a loan against their assets, pay off the loan over time and pay little to no tax versus just withdrawing from their assets.
Do you also have W2 income, or is it from something else like crypto? Because it's possible to just not pay taxes and get away with it if you get anything other than W2. I worked on some tax issues in the government, and the IRS is gutted right now. Not that I recommend it, it's just the situation.