The tech-heavy Nasdaq Composite and the benchmark S&P 500 closed lower ahead of the Thanksgiving break, as AI stocks remain under pressure.