Hi DiANA R,
I think that the best pieces of advice that has been given so far is;
- use thin and smaller pieces - so you get a feel for how it works
- use a glue gun
- use several layers
Foam board comes in a variety of thicknesses, and are made from different types of foam. I suggest you start out using thin layers. Preferably at or thinner than 1/2 an inch.
Once you get personal experience, and understand the options and limits of the flex of the foam, so you know more about how to get it to follow the curb of the metal, then you can possibly move on to using thicker foam in some locations.
You will want to use the types that are water proof, as in, they do not take in water if they are submerged in water (for days or weeks at a time).
If you use spray foam, you will also want to use spray foam that will not take in water, if a blob of it is submerged in water for days (or weeks).
My advise is that you make a simple test, using a bucket of water, submerge a sample of the foam (or spray foam) that you intend to use, and leave it submerged over night. And then 24 hours later, take it out and check to see if any water keeps dripping from the foam, after the water on the surface has cleared.
And then give it a very good squeeze, to see if any water got into cells inside the foam blob/sample.
Getting experience with how water (read: condensation) works/happens in a metal box, that you live in, is an important part of van living.