Let the glue dry then you can scrape it off with a cabinet scraper, though many of the other devices mentioned above work well. Using water might work, but will raise the grain. If you use enough water there is a potential for the joint to ‘sink’ after you sand it. Water can swell the wood enough to raise it into a barely perceptible hill, then when you sand, it looses more water and shrinks, leaving a small valley. Obviously you have to get it pretty wet for this to happen, but you also have to use plenty of water to get all the glue out of the pores.
I usually pre-finish pieces if possible .Then glue squeeze out is less of a problem.