there are many types of foam insulation.
white styrofoam, for walls above grade. Lets water and vapor go right thru it, unless it traps the water inside the cells. Not for below grade at all.
pink styrofoam, for low density below grad, less than 150 pound per square foot loading. Water proof
blue or gray styrofoam, for medium density below grade, 250 punds per square foot loading. Water proof
polyisocyanurate foam, closed cell, non water permiable, but pricey and poisonous. Water proof
styrofoam about R3.3 per inch
poly, crunchy foam, about R7.5 per inch
You will pay by the R factor, because the industry knows you need "X" R values to pass code, and prices accordingly.
When building below grade, think submarine, if you don't weld the seams your basment will leak.
The only way to not be a submaine, is to make sure there is a waterfall between your insulation/wall and the soil.
Air gap, between your wall and the soul, and a drain that is below your floor level, all the way around your foundation.
From out side to inside, in cross section, soil - drain fabric -
pea gravel - insulation - concrete - basement.
So any water going sideways from the soil, falls, thru the air gap, down into the drain, and has no pressure to make the wall leak.
Because pressurized water wins that battle, every time.
Use as much insulation as you can afford, you only gotta buy it once, if you keep it dry.