In typical 401(k) plans, the investment of the employee's contributions (as well as employer matching funds) must be in the mutual funds that are made available by the plan administrator. Current regulations require that the plan must offer certain types of mutual funds, including stock funds, bond funds, etc. Gone are the days when all the money went into a guaranteed income fund (basically an annuity offered by an insurance company).
A few plans do offer a self-managed option in which the employee sets up a brokerage account (usually through the plan administrator so that using (for instance) Schwab's brokerage when the plan administrator is (for instance) Fidelity) and has a wider choice of investments. However, such self-managed options generally come with much higher fees than the regular 401(k) plan options (which themselves often are mediocre mutual funds with high expense ratios, and sometimes are load funds or funds with 12b-1 fees).
Note: the "much higher fees" I am talking about are the annual fees deducted from your 401(k) assets by the 401(k) administrator (unless your employer has set up a specially munificent 401(k) plan in which the employer pays all these fees on behalf of the employee). For a 401(k) plan, these administrative fees can range from a small fraction of a percentage point of the assets under management to much much more. These fees are separate from any fees that the brokerage might be charging for buying ETFs (or mutual funds) or stocks and bonds, and the plan fee structure might be such that investing in the mutual funds of ETFs offered within the 401(k) plan means you are paying a lot less in these plan fees than when you have a brokerage account through the 401(k) plan. In one 401(k) plan whose details I am familiar with (albeit one from fifteen years ago), the in-house plan fee was 0.05% of the employee's 401(k) balance while the self-managed brokerage option had a 1% fee plus one had to have $250K in 401(k) plan assets to qualify for the brokerage option; ymmv.
So, yes, you can do what you are proposing (assuming your 401(k) plan administrator offers a brokerage option in addition to certain specific funds) but do take a look at the fee structure; it is important.
Finally, one thing to keep in mind is that with mutual funds (not ETFs), all your money goes into the mutual fund and starts "working" for you right away because one can buy fractional shares of the fund (a thousandth of a share, or in some cases, ten-thousandth of a share). With ETFs, one is restricted to buying an integer number of shares (unless the brokerage is willing to sell you fractional shares from its holdings) and so typically, your monthly/semimonthly/biweekly/weekly 401(k) contribution might have to sit in a money market fund/brokerage settlement account until such time as enough money has accumulated to buy an integer number of shares.