Investing early and often is an excellent method for building generational wealth. And while it can seem confusing at first, putting money to work in the stock market can be incredibly simple. It's all about focusing on owning shares of the right companies and holding them for the long term. Ignoring the noise, like the constant flow of financial news, is also critical. 

For the beginners who are just getting started, it's best to identify your options and weigh them based on your specific situation. Only then can you set yourself up for financial success. Moreover, investing even a relatively small sum of money can be a good starting point. 

If I were starting my portfolio from scratch today, here's how I would invest $500 in the stock market.

analyzing charts and data at work desk.

Image source: Getty Images.

Choosing the right path 

When investing in stocks, there are generally two choices to pick between. The first one is going the passive route, which means buying index funds. One popular option is the Vanguard 500 Index Fund, which tracks the performance of the S&P 500. Over the past 50 years, that broad market index has returned about 10% per year on average, with dividends reinvested. At that rate, investors can, over the long term, double their money every seven years. That's certainly healthy growth. 

Warren Buffett, arguably the greatest investor ever, argues that the average investor should simply buy index funds. Most people don't have the time, expertise, or skills to effectively select a portfolio of individual stocks that will consistently outperform the market, nor to properly manage that portfolio. Index investing is an easy, low-cost, almost automatic strategy that should result in outstanding wealth building over the long term. It's a smart strategy for most people. 

Active investing 

But in my case, I'm choosing to go the active investor route with that $500. In my day-to-day life, I have the time to read through earnings reports, listen to quarterly calls with management teams, and analyze financial statements -- and those are also things I enjoy doing. I also believe I have the expertise and the right temperament to do this successfully. To be clear, I'm still early in my investing journey, but I think that over time, I will be able to reap the rewards of actively managing my portfolio. 

Picking individual stocks can seem like an overwhelming task, but it's best to keep things as simple as possible. A good starting point is to identify companies you're already familiar with as a customer. It's also important to pick businesses you are confident have economic moats -- sustainable competitive advantages that allow an enterprise to generate strong financial results and fend off would-be rivals. Of course, solid growth prospects, as well as a reasonable valuation, matter too. 

A dominant tech giant 

If I had $500 ready to put to work, I would most likely use all of it to buy shares in Amazon (AMZN -1.61%). The company is a leader in e-commerce, cloud computing, and digital advertising, and most consumers likely interact with it multiple times per week. Amazon is almost essential to most of its customers, which provides a certain level of safety to the stock. 

The business benefits from multiple growth engines. So far, e-commerce accounts for less than 16% of all retail sales in the U.S. Amazon's ability to continue spearheading the secular shift toward more online shopping offers it a sizable opportunity. And its highly profitable cloud infrastructure segment, Amazon Web Services, is riding the wave of IT spending as organizations move more of their computing from on-premises systems to off-premises server farms. 

Finally, the stock is trading at a price-to-sales ratio of 2.6, significantly cheaper than its five-year average of 3.5. Buying $500 worth of Amazon stock seems almost like a no-brainer decision.