The Nasdaq and ‌the S&P 500 has closed lower as Nvidia and other AI-related shares gave back some of the previous day's sharp gains and investors braced for possible new tariffs.