I would use two paragraph styles named »Chapter« and »Part« to do this.
For Chapters you could use the existing styles for »Heading« or «Heading numbered« but I like to duplicate and rename them according to my needs. Chapters would have a hierarchy level 1 and a format description »Chapter [TAB]« for automatic numbering (see Paragraph > Styles > Enumeration/Table of Contents).
For Parts you could also duplicate a Heading style but set its hierarchy level to none which will place it above level 1 in the navigator. I wouldn’t use automatic numbering here because your structure isn’t purely hierarchical. In a purely hierarchical document, Chapters in Part 2 would start at Chapter 1 again.