The best way to get rich in the stock market is to plan to do so over the long run. Yes, many stocks may surge in value in short order, delivering massive profits, but finding those rare companies is easier said than done. For more reliable results, find very promising companies trading at reasonable or very attractive levels, and buy, aiming to hang on for years, if not decades.

Here are three candidates to consider for your portfolio.

1. Veeva Systems

Veeva Systems (VEEV -0.24%) may not be a familiar name to you, but it has grown by an annual average of about 18% over the past nine years, and recently sported a market value topping $26 billion. Better still, its stock has been pounded along with so many others in this market, and it recently sat nearly 47% below its 52-week high -- making it rather attractively priced. Its price-to-earnings (P/E) ratio was recently 13.5, well below its five-year average of 23.7.

So what does Veeva do? Well, the software-as-a-service (SaaS) company offers cloud-based systems for the consumer products, food and beverage, and chemical industries, helping them do what they do more efficiently. As an example, it helps pharmaceutical businesses manage their clinical trials of drugs.

In Veeva's second quarter, revenue grew 17% to $534 million, while subscription revenue also grew 17%, to $429 million. Having the bulk of revenue come from subscriptions should be attractive in investors' eyes, as it reflects fairly reliable, recurring income. CEO Peter Gassner noted: "We are early in a large and growing opportunity and look forward to expanding our position as the strategic technology partner to the life sciences industry across their most critical functions."

2. Nvidia

Nvidia (NVDA 0.35%) is a giant in the semiconductor arena, specializing in graphics processing units (GPUs) used by gaming systems, cloud computing operations, and data centers, among others. To get a sense of how appealingly priced it might be, consider this: It recently sported a market value of $356 billion -- and that's after a 59% drop from its 52-week high. Its price-to-sales ratio was recently 12, well below its five-year average of 17.

Nvidia has long been a market darling, but opinions are more divided about it these days. Some worry about a slowdown in sales of PCs, restrictions on sales of chips to China, and a stock price that's arguably still overvalued, despite its drop. Bulls may acknowledge these headwinds, but they see plenty of long-term growth potential. After all, the world will keep needing more and more chips, gaming is likely to remain a popular activity, and Nvidia's data-center acceleration technology should see plenty of demand.

If you're not quite convinced of Nvidia's value at recent levels, you might want to add it to your watch list, to consider it if it falls further. When reporting the company's second-quarter results, CEO Jensen Huang said: "We are navigating our supply chain transitions in a challenging macro environment and we will get through this."

3. Booking Holdings

Booking Holdings (BKNG -10.15%) has seen its shares tumble in value by about a third from its 52-week high, leaving it with a recent P/E ratio of 31, well below its five-year average of 147. The company refers to itself as "the world's leading provider of online travel and related services, provided to consumers and local partners in more than 220 countries..." It has some prominent brands, in, Priceline, Agoda,, KAYAK, and OpenTable.

Booking's recently reported third quarter shows it bouncing back nicely from the pandemic-related slowdown in travel. Room nights booked in the quarter popped 31% from year-ago levels, while total revenue increased by 29%, to $6.1 billion. (That last increase is a hefty 47% on a constant-currency basis.) Net income, meanwhile, surged 126%.

These are just three of many attractive investments out there these days. A little hunting will turn up plenty of others -- and if you don't have the time or interest to hunt, study, invest in, and follow individual stocks, know that you can do just fine over decades simply investing in simple low-fee, broad-market index funds.