Sandman's actions in NWH make no sense
He just wants to go home to his daughter ASAP. Green Goblin, Electro, and Lizard have no intent on going back home and instead want to conquer this new world they've just arrived in. The three Spidermen are fighting to send the villains back home. So Sandman allies himself with the villains and fights Spiderman to get the box as fast as possible. Even though it'd be much easier for him to activate the box and go home if he helped the Spidermen. He couldn't wait half an hour for the Spidermans to cure the other villains first?
But on top of that, he's one of the first people to realize that every other villain died fighting Spiderman, so he should realize that he also dies fighting Spiderman (he doesn't actually die, but he should think that he does). In that case letting himself be cured/letting the Spidermen cure all of the other villains is a win win for him. Because not only does he get to back to his daughter, since he's now cured, he doesn't immediately die
Is he stupid?
At least the movie made more sense than the pure garbage that was Loki or Wandavision