Let's consider an analogy using water. There is a large tank with high water level and from the bottom of the tank there are two open ended pipes of equal length but one is much thinner than the other. The pressure at the tank end of the pipes is equal for both pipes and higher than at the open end. As a general principle water flows 'downhill' from a high pressure region to a low pressure region and this difference in pressure can be thought of as a potential difference and this is another name for Voltage where the current flows from from a high potential to a low potential. If the larger pipe has 9 times the cross sectional area of the smaller pipe and if we ignore skin friction, we can can think of the larger pipe as being equivalent to a bundle of 9 of the smaller pipes and therefore whatever the flow rate is in the smaller pipe, the flow rate in the larger pipe will be 9 times greater.
This means that in a given time interval, 90 percent of the total flow out of the tank will pass through the larger pipe and only 10% of the total flow will pass through the smaller pipe. Think of the water flow as equivalent to electrical current. We cannot say the current has taken the path of least resistance, because the total current has gone via both paths in parallel so we cannot define the path of "the current". An electrical current is vast number of electrons roughly moving in the same direction and sometimes this current can be be split up into two or more parallel paths.
What we can say without ambiguity is that a single electron can follow a path of least resistance. This path is different for each electron.
how does current know how to pick the path of least resistance?
Let's change this to "how does a single water molecule pick the path of least resistance? This depends on initial location of the molecule. If the individual molecule in the tank happens to be near the entrance of the smaller pipe at the start it will find that the pressure gradient at that location directs it to the smaller pipe, even if that is not the path of least resistance. Not all the molecules follow the path of least resistance (the larger pipe). The same is true for for two resistors in parallel in an electrical circuit. Part of the current passes through the smaller resistor and we cannot meaningfully say "the current" follows the path of least resistance. We can only apply this principle to individual electrons.
If we put a valve in the smaller water pipe and shut the valve, then the flow cannot physically flow through the shut valve and the water does not 'choose' not to flow through the smaller pipe, but is prevented from doing so because it is physically impossible. The flow in the smaller pipe stops and this causes the pressure everywhere upstream of the valve to equalise with the pressure at the bottom of the tank, so there is no pressure gradient at the entrance of the smaller pipe directing molecules in that direction.
For example, if we have a short circuit which does not have any
resistance (in an ideal case) and a path with a resistor, it'll go
through the short circuit
The voltage drop across a resistor with zero resistance is zero. If the resistor with non-zero resistance is in parallel with the zero resistor the voltage drop across it will be zero and the current flow through it will be $I = V/R = 0$ so there is no potential gradient across the non-zero resistor and no flow will pass through it. The current through the superconducting resistor is $I = V/R = 0/0$ which is indeterminate. The current through the super conductor is not infinite as there will always be resistance somewhere in the circuit such as the internal resistance of the battery or imperfect connections.