The vacuum layer is the better insulator.
A thermos bottle like this has two walls made of glass and vacuum layer between those walls. Vacuum layer has very few molecules and they are distant from each other so heat transfer is prevented. That way liquid in thermos remain warm or cold.