U.S. stocks wobbled Tuesday after fresh data showed that Americans slowed their spending last month.

The S&P 500 was almost flat, hovering near its record high. The Nasdaq Composite edged down 0.1%. The Dow Jones Industrial Average rose 0.1%.

Fresh data showed that retail spending fell 1.3% in May. Supply-chain disruptions and business reopenings are triggering a consumer spending shift from goods to services.

Investors expect that stocks will climb through the rest of the year due to easy monetary policies. Many people are also betting that higher inflation, due to the easing of economic restrictions and supply-chain bottlenecks, will be temporary. Signs that inflation will be elevated for a prolonged period or that the Federal Reserve may retrace its support could shake that confidence, money managers said.

“Investors seem a bit more convinced the Fed will do what it says it is going to do and stay put,” said Edward Smith, head of asset allocation research at U.K. investment firm Rathbone Investment Management. “That should mean we have relatively easy financial conditions and that should be good for equity markets.”

In bond markets, the yield on the benchmark 10-year Treasury note was unchanged from 1.499% on Monday. Yields fall when prices rise.

Copper prices fell amid jitters about possible Chinese measures to tamp down rising commodity prices. The price of copper to be delivered in three months declined over 3% on the London Metal Exchange to $9,577 a metric ton.

Overseas, the pan-continental Stoxx Europe 600 ticked up 0.3%. The index has closed at a record for the previous seven trading sessions.

Japan’s Nikkei 225 rose almost 1% by the close of trading, and South Korea’s Kospi Index gained 0.2%. China’s Shanghai Composite Index declined 0.9% and Hong Kong’s Hang Seng Index retreated 0.7%.

Investors expect stocks will climb through the rest of the year due to easy monetary policies.

Investors expect stocks will climb through the rest of the year due to easy monetary policies.

Photo: Courtney Crow/Associated Press

Write to Caitlin Ostroff at caitlin.ostroff@wsj.com