There are many attractive shares on the S&P/ASX 200 Index (ASX: XJO) that could generate decent returns and perhaps even robust passive income.
But which are the best options for investors who want to buy and hold for several years?
Here are two of my top picks.

Image source: Getty Images
Xero Ltd (ASX: XRO)
It's been a bloodbath for Xero shares over the past year. After spiking at an all-time high of $194.21 in June last year, the cloud-based accounting software provider's shares have lost 60% of their value, at the time of writing.
It's been a step-and-continuous decline, too. Aside from a couple of small rebounds, the share price has consistently tumbled downwards. In early April, the ASX 200 shares dropped to a four-year low of $71.46 each.
The share price decline was mostly the result of a sector-wide sell-off of technology stocks following rising concerns that AI could disrupt traditional software models. Many investors were worried that smarter, cheaper tools could reduce the need for subscription platforms like Xero.
At the same time, investor concerns about the company's Melio acquisition and its potentially overvalued share price led many to sell up.
But I see Xero as an attractive long-term investment.
Its business model, which is often referred to as "sticky", means it has recurring revenue, global exposure, and good profitability.
The company is actively expanding its presence and its product suite. The company is still a relatively small market player, which means there is a large amount of potential future growth. These growth opportunities include expansion in the UK and US, as well as payroll and workflow automation offerings.
Xero's latest FY26 result shows the company is growing, too. It posted a 31% hike in operating revenue last week, and its adjusted EBITDA is up 18%.
Analysts rate the ASX 200 shares as a strong buy and forecast the shares to climb by 202% to $236.45 over the next 12 months alone, at the time of writing. I think the shares have the potential to accelerate even further over the next few years.
Brambles Ltd (ASX: BXB)
Brambles shares crashed 20% earlier this week after the company scaled back its guidance figures for FY26. The ASX 200 supply pallets and crates supplier revised its sales revenue growth forecast to 2% to 3%, down from prior guidance of 3% to 4% revenue growth (at constant exchange rates).
Profit guidance was also cut, with Brambles now expecting FY26 profit growth of 3% to 5%, down from prior guidance of 8% to 11%.
The company said that it has to spend more on repairing its pallets to bring them up to standard for customers who were increasingly automating their processes.
Brambles said it was progressively increasing its repair quality to meet this demand, which has created a bottleneck. But the company noted that the "material" cost increase is short-term.
It looks to me like the company is going through a rough period, and its shares are oversold.
Looking ahead, Brambles expects to expand margins by at least 3 percentage points in FY28 compared with FY24. Ongoing investment in innovation, digital capability, and customer solutions is a key part of the company's longer-term strategy.
It's also widely considered a defensive stock. Its business underpins essential fast-moving consumer goods and grocery supply chains, and its recurring business model means it can maintain stable earnings across different phases of the economic cycle.
I think that once it's through the latest short-term operational bottleneck, the company will switch back into a growth gear.
Analysts are still bullish on the stock, even after this week's sell-off. The majority (8 out of 15) rate the shares as a buy or strong buy. They also tip the shares to climb up to 70% higher over the next 12 months, as high as $27.90, at the time of writing.