You've probably noticed that a variable needs to be declared before it's used. For example, the following doesn't work:

print(my_name)
my_name = "Lane Wagner"
# NameError: 'my_name' is not defined

It needs to be:

my_name = "Lane Wagner"
print(my_name)
# Lane Wagner

Code executes in order from top to bottom, so a variable needs to be created before it can be used. That means that if you define a function, you can't call that function until after it has been defined.

Source: boot.dev