Stocks on Wall Street closed moderately lower Wednesday after another punishing pullback in AI stocks lost momentum as the day went on, reversing much of the market’s losses.