What is the difference between a variable instantiated inside a method(specifically inside void Start()) and one not inside any methods?

Just finished a project, and realize I’m confused with these two things:

int life = 10;


int life;

void Start(){
    life = 10;

usually, if one doesn’t work as I expected, I just do the other one.
I also notice on the tutorials I found that when they declare a List or Script, they always instantiate it inside Start()

List <GameObject> stages;

void Start(){
    stages = new List<GameObject>();

Hope to know the difference if there are, including on the event when I moved from one scene to another. For example, if I click a button that has a script like this:

    //scene 1 has the int life;
    //use static variable Player to access int life;
    Player.life = 3;


what is the value of life 0, 10 or 3;

Initializing a variable outside of Start or Awake will simply initialize that variable at the moment the constructor for that object is called. If your object inherit from MonoBehaviour the constructor get called when the object is created/loaded. Then once the serialized data is restored (if needed) to the object, Unity goes through Awake function then throught the Start function.

So pretty much it’s only a matter of when you want that variable to be initiated.

Constructor (which is kind of hidden in unity) → Awake → Start

And life should end up having a value of 10. Unity load the level at the next frame, so it will finish the current function and the Player.life = 3 will be overriden by the Start/Awake functions

Unity - Manual: Order of execution for event functions (look at the graph)