CNBC's Jim Cramer on Monday said he did not expect Lyft shares to get hit so hard on Monday after their after a positive Friday debut on the stock market. The rideshare app traded as high as $88 a share in its first day, but tumbled nearly 12 percent to settle at $69.01 on Monday. With a load of highly-anticipated companies planning to go public in 2019, he said it's a sign that investors must be very careful buying red-hot initial public offerings. Those include names such as Pinterest, Uber, and Airbnb. But there is a way to make money on the IPO frenzy without buying the new stocks, Cramer said. "If you want to play the IPO boom without taking the immense risk of buying these stocks right out of the gate, embrace the indirect approach and buy the more consistent winners here like Nasdaq, Goldman Sachs and Amazon," the "Mad Money" host said.

Invest in the exchanges

Cramer said investors can buy the stock exchanges that will list the oncoming IPOs. The usual suspects on the U.S. market are the New York Stock Exchange and the Nasdaq, he said. "Given where most of these deals are coming, I think Nasdaq's stock is the way to go," Cramer said. Levi Strauss went public less than two weeks ago on the NYSE, but was the only new name to list on that market in the first quarter. The Nasdaq brought 17 deals, including Lyft, to market in the first three months of the year, he noted. Additionally, Lyft was the Nasdaq's largest IPO since the faulty debut of Facebook on the tech-focused exchange in 2012. At the time, Facebook's stumble worried many tech companies, which pushed notable names such as Twitter, Alibaba, and Snap Inc. to list on the NYSE, Cramer said. Uber and Pinterest have also opted for the NYSE, but the host thinks the Nasdaq is in position to land big deals in the future. "Nasdaq delivered 11 percent organic revenue growth, double digit, in its latest quarter. That's a nice acceleration and 21 percent earnings growth," Cramer said. "Plus, with Nasdaq's stock trading at less than 16 times next year's earnings estimates, I think it's a bargain."

Underwriters

The investment banks that underwrite an IPO are well compensated, Cramer said. Goldman Sachs and JP Morgan handled the Levi's and Lyft offerings, respectively, and both firms will play a role in Pinterest's listing this year, he noted. "Goldman Sachs is a pure-play investment bank ... their underwriting business is much more of a needle-mover than JP Morgan," he said. "They win a bunch of these deals and it will really bolster their earnings power ... The IPO boom could be the catalyst that finally gets this, the cheapest on a price-to-earnings multiple brokerage stock that there is, [moving]." Uber is going through its public offering process with Morgan Stanley, which should be a "lucrative" deal for the bank, Cramer said. "Again, the financials are an unloved group, but these IPOs give you a reason to bet on the investment banks," he said.

Amazon

Amazon doesn't have direct exposure to the IPO market, but there is a high chance that its cloud segment does business with the company that's filing, Cramer said. Snap Inc. had $1 billion worth of business with Amazon Web Services at its initial offering, the host said. In Lyft's case, the ride-hailing company will pay the Amazon's cloud arm $300 million over the next three years, he said. While Pinterest is set to pay the company $750 million over a six-year period through 2023, he added. "Amazon Web Services dominates this business. Their next largest competitors, [Alphabet subsidiary] Google and Microsoft, don't even come close," Cramer said. "So as we see this parade of tech IPOs ... it's telling us how much — each one of them seems to have a deal with Amazon." AWS revenue grew 47 percent in 2018.

WATCH: Cramer explains how investors can make money on IPO season through the side door