"As the Space Launch System flies, it builds up tremendous heat. Without insulation, heat from launch would affect the stability of the cryogenic propellants and the rocket’s structural integrity would be compromised," said Michael Alldredge, who leads the thermal protection system team for the SLS core stage at NASA's Marshall Space Flight Center in Huntsville, Alabama. “NASA is asking this unique foam material to do the incredible job of protecting critical rocket systems, which vary from large structures to electronics and fuel lines, in an unforgiving launch environment with extreme temperatures and pressures.”One thing I would genuinely like to know is why they are bothering with the foam in the first place. On the shuttle it made sense because you couldn't have that ice hitting the orbiter, but now that we are back to in-line rockets, is it really necessary? Classic space rockets did fine just shaking the ice off at liftoff.
https://www.nasa.gov/exploration/systems/sls/insulation-protects-sls-from-fire-and-ice