Equity markets are unlikely to make anyone rich overnight, but with enough patience and discipline increasing one's wealth by investing in stocks isn't too difficult. One key ingredient in the formula that can allow investors to become wealthier is, of course, buying shares in solid companies with excellent growth prospects.

While there are plenty of options on the market, some corporations look almost too attractive to pass up. Here are two examples: HCA Healthcare (HCA -2.37%) and Veeva Systems (VEEV 0.91%). And here's why.

1. HCA Healthcare 

Most people regard medical care as essential -- we don't choose when we need to visit a hospital to receive timely and potentially lifesaving treatment. That's one factor that grants HCA Healthcare, a hospital chain, a resilient business. The company is a leader in its field with a deep presence across the U.S., although its facilities are especially concentrated in Florida and Texas.

Building a network of medical facilities is capital intensive. Building solid relationships with physicians, patients, and third-party payers is also difficult. HCA Healthcare has already done those things, so it is hard to see the company losing substantial market share. In fact, the company has generally increased its slice of the pie over time -- from 23% in 2011 to 28% as of about a year ago.

HCA Healthcare's financial results are excellent and improve year after year, at least usually.

HCA Revenue (Quarterly) Chart

HCA Revenue (Quarterly) data by YCharts

The company did experience some issues during much of the pandemic. Occupancy levels in its facilities (a key determinant of the company's revenue) were a bit unpredictable due to the outbreak, and it later had to face labor issues and higher expenses and costs related to inflation. But these are temporary problems. Pandemics (hopefully) won't be regular occurrences from here on out.

Meanwhile, HCA Healthcare should benefit from a major long-term trend: the world's aging population. As we all know, people need more medical care as they get older. So an older population means more trips to the hospital, longer stays, higher demand for surgeries, etc., all the things HCA Healthcare helps facilitate. That should provide a significant boost to the business over the long run. It also highlights why HCA Healthcare is such an outstanding stock.

The need for the kinds of services it offers won't stop, at least not until we find a way to permanently cure all illnesses -- something that doesn't seem to be within our reach. Until then, HCA Healthcare will continue to thrive thanks to its solid competitive edge and an improving market share. That's why the stock is such a no-brainer buy for long-term investors. 

2. Veeva Systems 

The expanding healthcare sector should also be a tailwind for Veeva Systems, which provides cloud solutions catered to pharmaceutical, biotech, and medical devices companies. Veeva is a big player -- perhaps even the biggest player -- in this relatively small pond. While healthcare is a vast sector, it represents only a fraction of the massive cloud market.

On the one hand, by overspecializing, Veeva Systems is intentionally giving up on pursuing hundreds of potential clients. But there are also benefits to this strategy. Veeva Systems wants to be an electrician, not a handyman; an oncologist, not a general practitioner. These specialists, like Veeva Systems, can build recognizable brands, become established as leaders in their fields, and charge higher for their services.

Veeva Systems has attracted the business of some of the largest drugmakers, including Eli Lilly, Vertex Pharmaceuticals, and Novo Nordisk, among many others. It usually adds more clients to its portfolio, as evidenced by its retention rates, which generally come in well above 100%. Veeva Systems' financial results have also been stellar.

VEEV Revenue (Quarterly) Chart

VEEV Revenue (Quarterly) data by YCharts

The company has experienced a slowdown in revenue and earnings growth recently, partly due to challenging economic conditions. Of course, that won't last forever. Veeva Systems estimates a $13 billion total addressable market (TAM). The company's revenue over the trailing twelve-month period was just $2.3 billion. Veeva may not grab the entire TAM by itself, but an additional 20% would double its revenue. And again, the company's TAM will continue to grow along with the healthcare sector.

Lastly, Veeva Systems benefits from an economic moat in the form of high switching costs. Its customers can't easily jump ship to another cloud provider without risking business disruptions, data loss, and more potential risks that could be disastrous for companies operating in a highly regulated industry.

Veeva Systems' economic moat and excellent growth prospects in a specialized area of the cloud market make it an excellent buy-and-hold stock.