If there's one constant on Wall Street, it's that things change. After holding up surprisingly well during the 2022 bear market, the utility sector has been Wall Street's worst performer in 2023, as of Dec. 1.

Most investors flock to utility stocks for their dividends and low volatility. Consumption habits for electricity, water, and natural gas don't change much from one year to the next. This often leads to highly predictable operating cash flow and the ability for utility stocks to pass along market-topping yields.

However, rapidly rising interest rates have created the perfect storm for this traditional safe haven. With Treasury yields soaring to around 5%, investors have been able to pile into longer-term bonds and short-term Treasury bills to net an equal or greater return than most utility stocks -- but with far less risk.

Multiple rows of electric meters on a utility panel.

Image source: Getty Images.

The good news for utility stocks is that Federal Reserve rate cuts are back on the table for 2024. As a result, Treasury yields have been retreating. The lower Treasury yields go, the more attractive this safe-haven sector becomes.

As we steam toward a new year, two utility stocks stand out as truly phenomenal buys, while another high-profile utility stock is best avoided.

Utility stock No. 1 to buy hand over fist in 2024: NextEra Energy

Among the more than 100 publicly traded utilities to choose from, the one that stands out as nothing short of a screaming buy for 2024 is electric utility NextEra Energy (NEE -1.36%). NextEra is the sector's largest utility by market cap ($122 billion).

In addition to being weighed down by higher bond yields, NextEra's stock took a big hit in late September and early October when NextEra Energy Partners (NEP -0.89%) slashed its dividend-growth guidance to a range of 5% to 8% through 2026 from an expected double-digit annual growth rate. Parent NextEra Energy orchestrates a number of drop-down transactions to NextEra Energy Partners, and this had investors clearly concerned that NextEra Energy's future growth may be impacted. Thankfully, NextEra Energy's third-quarter operating results and outlook put those rumors to bed.

What separates NextEra Energy from a veritable sea of electric utility stocks is its focus on renewable energy. Out of the 70 gigawatts (GW) of capacity NextEra had in operation as of Sept. 30, 34 GW were devoted to renewable energy. This includes 23 GW of wind capacity and 6 GW of solar capacity, both of which are high-water marks globally for any electric utility.

Investing in green-energy projects is undeniably costly. But the good news for NextEra Energy is that it's paying dividends. The company's electricity generation costs are considerably lower than its peers, which has led to a compound adjusted earnings-per-share growth rate of 9.8% since 2012. By comparison, most electric utilities grow their bottom lines by a low-single-digit percentage.

NextEra has no plans to slow down its green energy push, either. Between the start of 2023 and the end of 2026, an expected 32.7 GW to 41.8 GW of renewable energy is expected to be put into operation.

With NextEra Energy stock having its worst year in well over a decade, its forward price-to-earnings (P/E) ratio has fallen to 17.5. This marks the cheapest it's traded to forward-year earnings since 2015 and makes NextEra shares a phenomenal buy.

Utility stock No. 2 to buy hand over fist in 2024: York Water

A second utility stock that investors can confidently buy hand over fist in the new year is water utility York Water (YORW). As you're about to see, this under-the-radar water and wastewater utility provider is "Wall Street's Greatest Dividend Stock."

Unlike NextEra Energy, which was dragged lower by the poor performance of NextEra Energy Partners, there aren't any operating red flags for York. The poor performance of its shares in 2023 seems to be solely the result of Treasury bonds offering investors a potentially safer way to generate income. Further, York Water's 2.2% yield is only marginally higher than the yield of the benchmark S&P 500.

But this dividend is what makes York so special. The company has paid a continuous dividend to its shareholders since its founding in 1816. That's 207 consecutive years -- six decades longer than any other public company in the United States. That's how rock-solid York Water is from a payout standpoint.

The consistency of York's dividend is a function of it being a regulated water and wastewater utility for 54 municipalities in South-Central Pennsylvania. By "regulated," I mean the company is unable to pass along rate hikes to its customers without the state approval of a public utility commission (in this case, the Pennsylvania Public Utility Commission, or PPUC). Being regulated ensures that York avoids wholesale pricing, which makes its operating cash flow highly predictable.

To speak further on this point, York Water was given the OK in January 2023 by the PPUC to increase rates on approximately 75,000 of its customers. This rate hike is in response to $176 million in ongoing and future infrastructure upgrades. This increase is adding $13.5 million in revenue to the company's top line in 2023, which is a roughly 22% improvement from last year.

York's ability to make earnings-accretive acquisitions shouldn't be overlooked, either. Given that utilities typically operate as monopolies or duopolies in the areas they service, homeowners and renters rarely have a choice when it comes to which company handles their services. A steady diet of bolt-on acquisitions has worked well for York Water.

Three wind turbines next to an electrical tower, with the sun rising on the horizon.

Image source: Getty Images.

The utility stock to avoid like the plague in the new year: Hawaiian Electric Industries

Although the utility sector is typically a safe place to put your money to work, there's always the potential for downside. The one utility stock investors would be wise to avoid like the plague in 2024 is Hawaiian Electric Industries (HE -5.91%).

If there's one factor working in Hawaiian Electric's favor, it's that the company remains profitable on an adjusted basis. In fact, the $0.56-per-share profit reported during the September-ended quarter topped Wall Street's consensus by 4%. But that's about the only positive to bring to the table for Hawaiian Electric, which is attempting to navigate its way through a challenging situation.

The company's financial concerns stem from the tragic Lahaina wildfire that swept through Maui in mid-August, resulting in the deaths of 100 people. Dozens of outstanding lawsuits claim that Hawaiian Electric's equipment caused and/or failed to mitigate the deadly wildfire.

For its part, Hawaiian Electric is contributing $75 million out of the more than $150 million set aside for the One Ohana Initiative. This is a fund designed to help those who lost a loved one in the tragic wildfire, as well as people who were severely injured. But keep in mind that the One Ohana Initiative doesn't resolve the dozens of outstanding lawsuits against the company.

How much could it be on the hook for? Hawaiian Electric has $165 million in annual general liability insurance, according to filings with state regulators. But based on estimates from Capstone, the company is facing up to $4.9 billion in potential claims.

To make matters worse, Hawaiian Electric Industries will delay filing its financial statements. The multitude of lawsuits the company is facing, coupled with the aforementioned payout to the One Ohana Initiative, creates a mountain of financial uncertainty. This comes atop the company suspending its quarterly dividend shortly after the Lahaina fire.

The point is that Hawaiian Electric's future as a solvent business may be in doubt. Though it could be an incredible value, given its history of profitability and the infrastructure it already has in place, the dozens of lawsuits the company is facing may be a multiyear overhang. There's simply no reason for investors to take a big risk on Hawaiian Electric in 2024 when the sector is filled with time-tested, profitable, dividend-paying companies.