US stocks gave up early gains to end lower after economic and rate uncertainty topple strong earnings from AI darling Nvidia and retail giant Walmart.