US stocks have closed mostly lower as investors paused buying after a strong rally in the prior session.