In many cases, we can think of electrical circuits as waterways. Let's assume a scenario. In a closed water channel filled with water, the water is constantly circulating under the action of the water pump, but the water does not decrease or increase.
And solar panels and other generators function like water pumps. Solar panels and engines themselves do not produce electrons. Free electrons are always present in the wires and the positive and negative terminals of the battery, and they fill the entire circuit. The generator only provides driving force for the electrical charges in the circuit. That is, for the entire circuit, the role of the solar panel or motor is only to provide electrical potential energy. Electrons do not appear and disappear out of thin air. Electrons flow in a closed loop under the action of electromotive force and therefore do not decrease.
The flow direction of electrons is as follows: In a DC circuit, electrons start from the negative pole and return to the positive pole. Inside the power supply, electrons return from the positive terminal to the negative terminal.