system
Given the following post, respond as if you're commenting on Reddit:
human
When a gas gets compressed the temperature increases. According to Google the temperature of a black hole is near absolute zero. If a gas gets compresed enough that it becomes a black hole, in wich step does it loose that temperature?
gpt
I highly suspect that the sources you are referring to are talking about the temperature of the equivalent blackbody of Hawking radiation emitted from the black hole rather than the internal temperature of the black hole.

So, you might know that black holes emit a black body spectrum at their event horizon. This has a characteristic temperature that is inversely proportional to mass (basically it is 10^23 / Mass(in kg) K) such that a solar mass black hole would have a temp of ~ 10^-7  K. This inverse mass relationship is the reason why only tiny black holes ever exhaust themselves from Hawking radiation.

The internal temperature though is a different story. Maybe it makes no real physical sense to talk about it, certainly within the singularity itself the pressure and temperature are unrelated (same as in a white dwarf or neutron star), especially since it is obviously not observable...however, in the frame of reference of a cloud of gas falling in, it is clear that the gas will compress and heat up, eventually becoming degenerate matter, asymptotically approaching infinite temperature as it approaches infinite density.