Heightmap-based displacement with 90-degree corners
Here’s one way to do it mostly non-destructively:

Start with a plane.


In edit mode, use CtrlE ▸ Subdivide to subdivide the plane into a 16×16 grid.


Add a Bevel modifier with Limit Method ▸ None, Amount ▸ 0.0001 m, and Segments ▸ 1. This creates some additional geometry so displacements are sharp.


Add a Displace modifier using your height map texture. Under the texture options, make sure to disable the Sampling ▸ Interpolation option, so the boundaries of the height map will be sharp. This produces a nice, sharp result:


To clean up the geometry, add a Weld modifier followed by a Decimate modifier set to the Planar mode. This will delete most of the redundant edges, leaving a clean, low-poly mesh: