Many other people have asked how an electron decides which path to take, but no one has asked how long do they take. Is there an equation for their "uncertainty" time? Do they decide instantaneously (i.e. something to do with quantum mechanics)?
I guess the answer you are looking for is that the electric field propagates at the speed of light.
Suddenly add a voltage source to a complete circuit and the electric field will spread at the speed of light $c$. Depending on how far away a specific electron is in the circuit, this electron will soon feel this electric field and then immediately react to it.
You then say (in a comment to another answer) that the circuit apparently "knows" what the potentials and currents are at specific points. Well, does water in a stream "know" that the speed is higher at a narrow spot further down-stream or that the pressure is higher deeper into the stream? That the water should "know" anything is not really a meaningful thought. Likewise for charge flow (current) in a circuit.
Because of the interactions that happen from one electron to another, between electrons and atomic cores, and via the force from electric fields, electrons react individually under their local conditions. They might drift faster in narrow wires, just as water speeds up at narrow parts of the stream, because of a push from further up-stream by the many particles that want to get through.
Have a look at capacitors and how they work to store charge on their plates. These are examples of components that react during a much longer time interval than other circuit parts such as components and wires, simply because they have an actual capacity to store charge and it takes time to "fill them up".