I've been using Elmers glue for many years on green, pink & white foam.
Everyone to their own glue types. When U use Elmers it has to sit for at least 24 hrs. to bond. If you need to take it out later, it comes apart easier by prying it apart w/a putty knife. Some use a hot melt glue gun. Liquid nails is good too. I always lay some weights on mine to help hold it down. If you put it together at an angle & want the glue to set, push a nail into both pieces(long nail) & leave till it dries & then pull the nail out. Sometimes I leave the nail in to get that xtra holding power. I've gotten away from foam almost alltogether. I use Celotex ceiling tiles, but, that's a whole scenery idea that's been around for a long long time.
Larry