This a good question. How to make the structure of a piece of WL code, in a notebook, easier to understand? I dont know how to do this "automatically". But it can be done manually. By rewriting the code in a Code
cell (as opposed to to the standard Input
cell) and inserting linebreaks and indentations.

The example below is from the Manipulate
documentation
Copied from docs to an Input
cell:
Manipulate[
ArrayPlot[
Take[data, h, w]], {{data, RandomInteger[{0, 1}, {10, 20}]},
ControlType -> None}, {{h, 5}, 1, 10, 1}, {{w, 5}, 1, 20, 1},
Dynamic[Panel[
Grid[Outer[Checkbox[Dynamic[data[[#1, #2]]], {0, 1}] &, Range[h],
Range[w]]]]]]
Copied to a Code
cell and edited:
Manipulate[
ArrayPlot[
Take[data,h,w]
],
{{data,RandomInteger[{0,1},{10,20}]},ControlType->None},
{{h,5},1,10,1},
{{w,5},1,20,1},
Dynamic[
Panel[
Grid[
Outer[
Checkbox[
Dynamic[data[[#1,#2]]],
{0,1}
]&,
Range[h],Range[w]
]
]
]
]
]