When the electron flows through a medium, it leads to the generation of an electric current.
Electric current moves in the direction opposite to which a negative charge moves.
Negatively charged electrons tend to flow from a region of lower potential to a region of higher potential, hence the current flows from higher potential to lower potential.