In some translations the first part of this verse is separated from the second part (see for instance the NKJV and the KJV). But it is most likely that 4a and 4b form one sentence. Arguments for this are that firstly the chiastic structure stresses the unity of verse 4. Secondly the last toledoth expression in the Pentateuch (Numbers 3:1) has the same when
or at the time.
There it is clear that the words that follow also belong to the toledoth expression. Thirdly in the toledoth expression of Genesis 5:1, whatever follows the expression in the day that
(many translations; ESV: when) is connected to the first part of the verse. Fourthly, the old Jewish scholars who transmitted the Hebrew text, placed a full stop at the end of verse 4.
4 These are the generations of the heavens and the earth when they were created, in the day that the LORD God made the earth and the heavens.