U.S. equities finished modestly higher, paring some of the losses that have weighed on the markets to start of 2023.