Whether you're an experienced investor or just getting started in the stock market, exchange-traded funds (ETFs) can be a smart investment. However, not all ETFs are created equal, and the right choice for you will depend on your unique situation.

Two of the most popular ETFs include the Vanguard S&P 500 ETF (NYSEMKT:VOO) and the Invesco QQQ ETF (NASDAQ:QQQ). Both of these funds have their advantages and disadvantages, but which one is best for you?

Person sitting on the floor looking at a laptop.

Image source: Getty Images.

VOO: Pros and cons

The Vanguard S&P 500 ETF aims to follow the performance of the S&P 500 index and includes just over 500 stocks from some of the largest and strongest companies in the U.S. One of the biggest advantages of investing in this ETF is that it provides exposure to a wide variety of stocks from multiple industries. This creates an instantly diversified portfolio, limiting your risk.

The S&P 500 itself also has a long history of earning positive returns over time. While the stock market is always prone to short-term volatility, it has historically earned average returns of around 10% per year. In other words, you may earn higher-than-average returns in some years, but in other years, you may experience losses. However, those returns should average out to around 10% annually over time.

One potential downside to this ETF is that it only earns average returns. The S&P 500 is a strong representation of the market as a whole. And because this ETF aims to match the performance of the market, it's impossible for it to beat the market.

For some investors, the stability this fund provides outweighs the higher returns you could potentially earn with other funds. But if you're aiming to beat the market, this ETF may not be the best fit for your portfolio.

QQQ: Pros and cons

The Invesco QQQ ETF includes around 100 stocks from the technology sector and aims to closely track the Nasdaq 100 Index. Some of its largest holdings include behemoth tech companies such as Apple, Microsoft, Amazon, and Tesla.

Unlike the S&P 500 ETF, the Invesco QQQ focuses solely on one industry. This could make it a smart choice for someone looking to invest primarily in tech stocks -- specifically, the top performers within the tech sector.

That said, because this fund only includes stocks from one sector, that lack of diversification can make it riskier than the S&P 500 ETF. Although the ETF contains around 100 stocks, it could have a significant effect on your investment if the tech industry as a whole experiences a downturn. For that reason, if you choose to invest in this fund, it's wise to make sure the rest of your portfolio is well-diversified.

Another advantage of this ETF is that tech stocks often earn higher-than-average returns. While this fund has earned an average rate of return of around 10% per year since its inception in 1999, it could potentially beat the market over the long run.

Choosing the right ETFs for your portfolio is key to generating long-term wealth. The Vanguard S&P 500 ETF is a smart choice for those looking for a broad-market fund with a long history of growth over time, while Invesco QQQ may be a good fit for those looking specifically for tech stocks. Both can make fantastic investments, and understanding the advantages and disadvantages of each ETF can help you decide which one is a better fit for you.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.