Mental Model
We use a stack to keep track of opening brackets and check if each closing bracket matches the last opened one.
Analogy: Imagine stacking plates: you put a plate on top for every opening bracket, and remove the top plate when you see a matching closing bracket. If plates match perfectly, the stack ends empty.
Stack (top at right): []
Expression: ({[]})
Initial: Stack: empty
When '(' comes: Stack: ( ->
When '{' comes: Stack: ( -> { ->
When '[' comes: Stack: ( -> { -> [ ->