U.S. stocks closed higher Tuesday, even as traders grappled with concerns over how the global economy will withstand the delta variant of the coronavirus as well as Chinese regulatory action.