Ezra 4:24 (ESV)

24 Then the work on the house of God that is in Jerusalem stopped, and it ceased until the second year of the reign of Darius king of Persia.

The work of rebuilding the temple was stopped as a result of the opposition mentioned in Ezra 4:4–5. This opposition continued in the reign of Ahasuerus and Artaxerxes when the Jews wanted to rebuild the walls. The parenthesis (Ezra 4:6–23) was meant to show that this opposition was not a once off but is something that continued for a long time. Having reflected on this opposition, the author brings us back to 520 BC and the rebuilding of the temple.