Yes, as the course creator you can decide whether a sequence of lectures is optional or mandatory. By default the sequence is optional and the learner is free to attend the different lectures of a course in any order. To make the sequence mandatory, check that option in the course's lectures list.
You can change the order of your lectures with drag & drop.
If an exam has to be taken after a certain lecture then this exam becomes part of the navigation.
Read also: Can I dictate an exam be taken after a specific lecture?