Why is the code in this image not equal to this one-dimensional code form?

list3 = NestList[
   ArrayFlatten[{{{#, 0, #}, {0, 0, 0}, {#, 0, #}}, {{0, 0, 0}, {0, #,
         0}, {0, 0, 0}}, {{#, 0, #}, {0, 0, 0}, {#, 0, #}}}] &, {{{1}}},
    3];

How can the code form in the image be rewritten equivalently in one-dimensional form?

You forgot the ,3 at the end of ArrayFlatten:

NestList[ArrayFlatten[{
    {{#, 0, #}, {0, 0, 0}, {#, 0, #}},
    {{0, 0, 0}, {0, #, 0}, {0, 0, 0}},
    {{#, 0, #}, {0, 0, 0}, {#, 0, #}}},
   3] &,
 {{{1}}}, 3]