|barrier = retaining_wall|
|A structure that holds back soil or rock from a building, structure or area.|
|Rendering in openstreetmap-carto|
|Used on these elements|
|Tools for this tag|
Ais a structure that holds back soil or rock from a building, structure or area. Retaining walls prevent downslope movement or erosion and provide support for vertical or near-vertical grade changes.
Also consider one-sided cutting=*s if it lines a highway and isn't a man-made wall. They're more flexible (but slightly less accurate) if you're refining an established way which already has other aspects that rely on its direction, such as already being oneway=yes or cycleway:left=lane, that would need to change to incorporate barrier=retaining_wall's "right side is bottom, left side is top" convention.
How to map
barrier=retaining_wall behaves same as natural=cliff, that is no crossing as left-right are different heights. Lower side on right side of way direction, often rendered with dots, triangles or the like.