When should we construct trees, graphs to analyse an algorithm?

In many algorithms, it’s easy to understand how the algorithm is executed, but as for why it works well and how it can work, it’s not very easy to see, sometimes, authors construct trees or graphs to put things analysed in them and use those stuctures to describe the property of the research object and prove some property of the structures to finally give an explanation why it works well…

When should we use trees, graphs to analyse an algorithm? Or equivalently, what property do trees or graphs do well in describing in theory.

Like, in sort algorithms, many algorithms are analysed with a binary tree, in 2SAT algorithms, the core of the problem is decribed as a graph.

Well, for the problems with fixed mode, the structures can be implied easily, like the problems in OI or leetcode, however, in research such situation is not so likely to happen.

If the best probably answer is: well, when you feel some structures are proper, you can try them, it is hard to say which must be used and which shouldn’t. I accept it. I look forward to a more inspiring answer.