system
Given the following post, respond as if you're commenting on Reddit:
human
Why is gas under pressure cold?

This might be a stupid question and I still haven't figured this out..

So obviously stars are made of gas etc. My extremely basic understanding is that they're really hot because they're under extreme pressure.

Why is compressed gas in e.g. cannisters or lighters cold?

EDIT: Thank you everyone for your answers, it's actually pretty interesting.
gpt
The compressed gas or lighter only gets could when gas is released. If you don't press the button it will simply equilibrate to room temperature.

Your lighter and compressed gas consists of volatile organic compounds. Under pressure they are liquid, but in atmospheric pressure (i.e., when you depress the lever or press the button to release the gas) it turns into gas. In other words, the liquid evaporates. Evaporation is an endothermic process, meaning it takes heat from the environment to turn a liquid into gas. That's why it gets colder the longer you release gas.

It is a similar idea to rubbing alcohol on your skin making you feel cool - the alcohol evaporates and takes heat away from your skin.