Hi Antionio,
presumably you want to do this dynamically at runtime, rather than modifying the OSM input, correct?
We've looked at this problem before and, this is actually not easy, as you would need to know the OSM way ids to do it precisely.
This is the "most standard" format I could find that expresses road closures, roadworks etc.
In OTP I would consume this CIFS feed and do geometric calculations to match the geometries/linestrings to the internal street edges and modify the traversal permissions, so that cars cannot pass anymore. An extra complication would be to only match part of an edge - in such a case you would have to split it in multiple parts. Another one is closures that happen in the future.
If you're looking for a regularly updated CIFS feed I might be able to provide one, but I have to check the license first.
As you might have noticed, I've been thinking about this problem for a while and am happy to adivse and help.
Best,