like a normal turn restriction but with type=restriction:hgv

Add way A and B plus node n into a relation. Add
type=restriction:hgv
restriction:hgv=no_left_turn
and in the lower left window apply
“via” to n
“from” to A
“to” to B

or the way you need it. If all is fine, you should see a street sign in JOSM.

Edit: You will not see a street sign, just tried it. You only see it if it is a general turn restriction (i.e. without “:hgv”)