As we near the end of 2022, it's never too early to begin thinking about which stocks will be great buys heading into 2023. More so than other years, this new year has a lot of uncertainty surrounding it because of the record inflation levels and possible looming recession.

Regardless of what happens in 2023, investors should look into beginning or increasing their stake in these consumer goods stocks. Here are three to consider now.

Walmart

In a year when major indexes and blue-chip stocks have seen their value slashed by double digits, Walmart (WMT 0.12%) has been one of the few non-energy stocks in the green for the year. In the third quarter of this year, the company brought in over $152.8 billion in revenue (up over 8.3% year over year), and sales in the U.S. were up 8.2%. 

What makes Walmart a great buy for 2023 is its commitment to providing low prices. As we approach 2023 and a potential recession drives economic anxiety, people will undoubtedly go to where the value is. With inflation hitting levels we haven't seen in decades in 2022, the retail giant said it's seen more higher-earners gravitating toward its products, and this isn't likely to slow down anytime soon.

What separates Walmart from competitors like Target (TGT -2.42%) and Amazon (AMZN 0.72%) is the role that grocery sales play in its business. Target sells groceries, and Amazon has Whole Foods in its arsenal, but that doesn't do much for a price-conscious consumer. By providing low prices, Walmart has seen its grocery sector account for more than half of its total sales. People always need groceries, and the category is primed to carry Walmart through 2023.

Procter & Gamble

With brands that include Bounty, Pampers, Tampax, Tide, Head & Shoulders, Gain, Crest, and many others, Procter & Gamble (PG -0.10%) has its products in almost every retail store, convenience store, and grocery store in the U.S. But maybe more importantly, Procter & Gamble's products are consumer staples, meaning they're essentials that lie in the "needs" category versus the "wants" category.

People adjust their spending habits when they're strapped for cash and the overall economy is less than ideal. They may give up eating out, shopping, and other forms of entertainment, but they won't give up personal healthcare, baby care, feminine care, grooming, and the like. This makes Procter & Gamble a classic example of a defensive stock.

Defensive stocks are companies with consistent and stable earnings, loaded balance sheets, and products that sell regardless of economic conditions. With revenue of $20.6 billion in the first quarter of its 2023 fiscal year, Procter & Gamble is a certified cash cow, and there's little reason to believe this won't increase in the coming year. If you're looking for a recession-proof stock, Procter & Gamble may very well be it.

Coca-Cola

After being down over 8% from the start of 2022 to mid-October, Coca-Cola (KO 0.13%) has managed to bounce back. It's up over 15% since Oct. 11 and over 5% year to date (as of Nov. 23). Few companies have the worldwide brand recognition of Coca-Cola, and the beverage giant has always managed to use that to its advantage.

Like Procter & Gamble, Coca-Cola's brands -- including Sprite, Simply, Powerade, Dasani, Topo-Chico, and more -- manage to sell regardless of economic conditions. In its latest quarter, Coca-Cola brought in $11.1 billion in revenue, up 10% year over year. And although soda consumption is declining worldwide, Coca-Cola has done a great job at not relying too heavily on its flagship sodas to bring in the big bucks.

There's no doubt that Coca-Cola has everything needed to bring in solid revenue in 2023, but regardless of how its stock price performs, investors can take comfort in knowing they'll get their dividend payments regardless. Coca-Cola has increased its yearly dividend for 60 consecutive years, earning it the heralded title of a Dividend King. The company has shown that it can weather bad economic storms and still provide value to its shareholders.