Amazon (AMZN 2.29%) went from monster gains throughout the pandemic to more muted growth as a result of macroeconomic headwinds. But the business is still performing well in uncertain times.

The optimism surrounding this tech giant has been rising this year, with shares up 83% (as of Dec. 18). This is likely due to accelerating revenue growth in the past few quarters.

Despite the company's strong rise, investors should rush to buy Amazon stock before the end of 2023. Here are some important reasons this is a no-brainer decision.

Amazon's growth is key

Amazon's Q3 revenue growth of 13% is a marked slowdown from the greater-than-20% top-line gains the business was posting for several years before 2022. However, there's no reason for investors to panic. The fact that Amazon, at its current scale, can still expand by double-digits is wonderful.

What's unique about this company is that it benefits from numerous growth tailwinds. Online shopping is still a tiny fraction of overall retail spending in the U.S. As the dominant leader in e-commerce, Amazon will undoubtedly capture a lot of this growth.

There's also cloud computing, one of the fastest-growing areas of the economy. Amazon Web Services (AWS) is leading in worldwide market share, thanks to its first-mover advantage in the space.

With Prime Video, Amazon has exposure to the rise of streaming entertainment. And this company is becoming a bigger force in the world of digital advertising.

This is one of the reasons why Amazon is a better stock to buy right now for long-term investors than Apple. The iPhone maker is one of the best businesses of all time but has less growth potential and fewer options than a company like Amazon, which has its corporate fingers in multiple industries with long expansionary runways.

I can see why many investors might be rightfully concerned that due to Amazon's massive scale, the law of large numbers will start to be a headwind for the company and its expansion. But there's no rule that says revenue can't keep growing, especially if the business keeps customers as the primary focus.

Protection from a massive economic moat

When trying to assess whether a particular company is of high quality, I immediately try to figure out if there's an economic moat present. This means a business possesses favorable qualities that protect its competitive position not just now, but hopefully for many years.

Amazon's online marketplace benefits from network effects. As more merchants sell their goods on the site, consumers will be better off because there will be a wider selection of merchandise to choose from. As more customers flock to the site, both existing and prospective merchants will find a larger shopper base.

In just the last few years, Amazon's capital expenditures have ballooned. And a lot of this spending has been directed to improving and expanding its logistics network to better serve customers with fast and reliable shipping.

Nowadays, Amazon has developed a cost advantage, thanks to its sprawling regionalized fulfillment system. Because of the deep infrastructure of warehouses, trucks, planes, and drivers, for example, coupled with the sheer volume of goods being shipped, the business can deliver items at a lower cost structure than pretty much any other company.

These factors that contribute to Amazon's economic moat substantially raise the chances that this business will still be dominating many years from now. And this is exactly what long-term investors should be looking for when picking stocks to own.

To hammer home this point, think about a company that lacks an economic moat. If you want to own the shares for 10 years, buying the stock would be a risky endeavor. You'd lack confidence in the company's ability to even survive that far into the future if it can't outcompete rival firms.

For Amazon, this isn't really a concern. It's a smart stock to buy before the year ends.