Stifling a sneeze may be the purest, simplest body hack. We've posted a couple of methods before (pull on your nose, put a finger under it, or bite your lip), but I've always relied instead on pressing my tongue on the roof of my mouth. (You can also tickle instead of pressing.)
Photo by Dead Cat
This is mostly a matter of overloading the brain with benign sensory input to dull the more unpleasant input. That's why the same tongue manoeuvre helps you fight a brain freeze or stop crying over onions.
There's nothing wrong with letting out a good sneeze (as long as you cover your nose and mouth), but sometimes you need to be quiet or avoid attention. If you need to prevent a sneeze, you can do a simple trick with your nose.