I'm trying to communicate through I2C with a temperature sensor (STS21) using interrupts on STM8S003F3 board but i can't manage to make it work
You need to debug this with method, it will be hard for us to find the problem. Check several things:

Is the value in T written during the interrupt? Is it 0 before the interrupt happens? Or is this just a random value, that happens to be in memory? If you are sure, that T really is written in the interrupt you can go one step further.
What values do you get in &quot;a&quot; and &quot;b&quot;? Do they contain the values you expect? If yes, your conversion is wrong. If not, the I2C readout does not work.
Does the I2C readout work at all? Use a scope or logic analyser to check the I2C lines. Compare with the data you expected on the data lines.
Depending on how the data on the I2C lines deviates from the expected values you can further narrow down the problem.

Debugging should always follow a logical approach like this. Try to narrow down the place where the problem occurs.