Nvidia helped pulled U.S. stock indexes higher Tuesday after they stumbled in the morning on worries about escalations in the Russia-Ukraine war.