U.S. stocks have posted an impressive election-year rally so far in 2024. But as investors question whether that rally will continue, they’re watching inflation and economic-growth data to gauge the Federal Reserve’s potential interest-rate path, as well as corporate earnings in the second half of this year.