US stocks rise amid diplomatic efforts to ease the Israel-Hamas conflict