Some investors might be tempted to chase momentum and buy the highest-flying stocks around. Others could be worried about the stock market's nosebleed valuation and avoid stocks altogether. I think there's a middle-of-the-road strategy that's better than either of those approaches.

Instead of chasing unsustainable momentum, find stocks that are poised to deliver exceptional long-term gains. And rather than staying away from the market because of valuation, find stocks that are bargains. 

With those two goals in mind, here are my picks for the best stocks to invest $5,000 in right now.

1. Vertex Pharmaceuticals

Vertex Pharmaceuticals (VRTX -0.06%) hasn't skyrocketed 50% or more as some stocks have so far in 2023. However, the biotech stock nonetheless has a good head of steam going with a year-to-date gain of nearly 25%. More importantly, I think Vertex has plenty of room to run.

The company is awaiting regulatory approvals in the U.S. and Europe for exa-cel in treating sickle cell disease and transfusion-dependent beta-thalassemia. The gene-editing therapy seems likely to become Vertex's first blockbuster outside of its core focus area of cystic fibrosis (CF).

More highly promising drugs could also be on the way. Vertex anticipates three other launches over the next five years. The company could have its most powerful CF therapy yet with its vanzacaftor triple-drug combo. Non-opioid pain drug VX-548 could have tremendous commercial potential. Inaxaplin targets APOL1-mediated kidney disease, an indication that affects more patients than CF.

But is Vertex ridiculously expensive? Not at all. Its shares trade at a price-to-earnings-to-growth (PEG) ratio of only 0.58. Any PEG multiple below 1.0 is considered to be an attractive valuation.

2. Brookfield Renewable

Brookfield Renewable Partners (BEP 0.19%) and Brookfield Renewable Corporation (BEPC 0.09%)stand out as other stocks that have delivered a solid albeit not spectacular performance so far this year. Brookfield Renewable Partners, a limited partnership (LP), trades under the BEP ticker while Brookfield Renewable Corporation, which has a corporate structure that avoids the tax hassles associated with an LP, trades under the BEPC ticker. They are up about 18% so far this year.

Both stocks have the same underlying business. And it's a great business. Brookfield Renewable operates hydroelectric, wind, solar, and distributed energy facilities across the world.

The company expects to deliver total annual returns of between 12% and 15% over the long run. This goal seems quite attainable considering the likelihood of strong demand for renewable energy over the coming decades.

At first glance, Brookfield Renewable might not seem like much of a bargain with shares trading at forward earnings multiples of 26. But with the growth the renewable energy provider is poised to generate, that valuation actually looks really attractive.

3. U.S. Bancorp

Unlike Vertex and Brookfield Renewable, U.S. Bancorp (USB 0.32%) hasn't been a winner for shareholders so far this year. Its stock has fallen by 11% while the overall market has soared.

Bank failures earlier in 2023 caused a banking crisis that clobbered U.S. Bancorp's share price. While the stock has bounced back considerably from its lows, it still hasn't fully recovered. I expect that it will, though.

U.S. Bancorp weathered the Federal Reserve's annual stress test well. CEO Andy Cecere said in June that the test showed that the bank is "well-capitalized and remain[s] prepared to withstand a severe economic downturn." The company also delivered solid second-quarter results

There are a couple of positive effects of U.S. Bancorp's big sell-off. Its dividend yield was pushed higher and now stands at nearly 5.2%. The stock is also dirt cheap, trading at below 8.4 times earnings estimates.