According to Boyle's law, the pressure of a gas is inversely proportional to its volume when temperature is held constant. In other words, as the volume of a gas decreases, its pressure increases, and vice versa.
When a gas is cooled, its molecules lose kinetic energy and move more slowly. This causes them to occupy less space, resulting in a decrease in the volume of the gas. Since the volume of the gas is decreasing, the pressure inside the closed container must also decrease in order to maintain the equilibrium state of the gas.
Therefore, when a sample of gas is cooled in a closed container, the pressure inside the container decreases.