How can I move the values from a list on one script to list on another?

I am trying to creating a pathfinding script and I have a list of nodes that I want to move to another script. Does anyone know how to do this? Thanks in advance.

Example (I need to move the values from this list to a list on another script):

public List<Node> grid;

[System.Serializable]
public class Node {
     public Vector3 position;
     public bool walkable = true;
}

//Adds nodes...

So why don’t you just create same List variable in that Another Script, get reference to it in this current script and just assign variable via it?

There are several ways, for example considering your script is on an object. So get the object to whom you want to assign the list i.e. using tag.
ClassName a = object.GetComponent();
Now you can assign object a list to public data