Tariffs and trade are the two most prominent dampers on the stock market's gains, but if they go right, they could become its biggest drivers, CNBC's Jim Cramer said Monday.

The Trump administration's economic policy has dominated the news narrative as trade tensions between the United States and China, Canada and the European Union have bubbled up, Cramer said.

"Automobiles are the crux of global commerce and if we started seeing higher tariffs on cars, that’s bad for the whole market," Cramer said, referencing President Donald Trump's threat to place 20 percent tariffs on all car imports from the EU.

But if the president's push for fairer trade deals ends positively, as National Economic Council Director Larry Kudlow suggested it might last week, it could be a huge boon for stocks, the "Mad Money" host argued.

Case in point: Reports in early July and Kudlow's comments to Cramer at Delivering Alpha suggested the EU was considering making a "zero-for-zero" tariff deal with the United States in response to Trump's threat.

"If Larry’s right and the Europeans come bearing gifts — maybe we make a deal to drop all auto tariffs on both sides — I think this market could go much higher," Cramer said.

Even so, a zero-for-zero deal would likely have its pros and cons, especially when it comes to U.S. truck manufacturers that are protected by U.S. tariffs on European imports, according to the International Trade Centre.

All things considered, Cramer, a lifelong investor, warned that as long as the president remains trade-focused and Twitter-happy, investors should remain vigilant.

"As an investor, these trade tensions are not positive for the stock market. As long as President Trump appears erratic on these issues, or, more accurately, often at odds with some of his staff, I say we have to be on guard," he said.

"Even though most stocks tend to bounce back after Trump’s tweets," trade isn't the same as one-off shots at Amazon, Cramer said. "Tariffs are different; we know the president’s willing to pull the trigger, and someone always gets hurt when you change trade policy."