It depends. Pretty much all topics can be understood with either approach. If you follow a course, pay attention to the lecturer on day 1, they’ll surely say what their approach to the course is. If you follow a book or a set of notes, read the intro or preface to see what the author had in mind.
Going linearly from start to finish is more and more complicated the more advanced the subject is, because often there is no finish, and it’s hard to find the start. That is why it’s not a bad idea to understand the examples that motivated the theory. Mark my words, theories stem from specific examples. Understanding a few models gives you some advantage in understanding the theory at some point. Well, these words are not mine, but you know what I mean.