The best ans has already cleared the doubt between call by name and call by need. But i think some more points about static and dynamic scoping will provide a clear picture.
Static Scoping : More dominant than dynamic scoping. Means all languages generally prefer Static Scoping ( except language Perl which supports both).
Compiler in Static Scoping searches first in the current block and then globally.
Dynamic Scoping: Identifier has a global stack of bindings and the occurrence of an identifier is searched in the most recent binding.
In simpler terms, in dynamic scoping, the compiler first searches the current block and then successively all the calling functions.
Dynamic Scoping doesn't depend on how the code is written but on how the code executes.
Each time a new function is executed, a new scope is pushed onto the stack.
Hope it helps 🙂