Hi,
If you have the setting "Update the product stock on confirmed status" turned off, then the stock will only be decreased when an order is created.
And then, if you change its status to a cancelled status, it will give back the stock.
There is no mechanism in such case to decrease again the stock if you go from a cancelled status to the created status.
With that option turned off, the stock will only be decreased when an order goes from the "created" status to a confirmed status. And it will give it back if you go from a confirmed status to a cancelled status. So in that case, you can do full circles going:
created -> confirmed -> refunded -> created -> confirmed -> refunded -> created ...