This is the Hall effect. When current flows to the right, it means that positive charge flows to the right or negative charge flows to the left. According to the Lorentz force of the charge in the magnetic field, if the left hand rule judges, the positive charge is subjected to an upward force, so it deflects upward and accumulates on the upper surface, and the negative charge accumulates on the lower surface, so the upper potential is high.
This is a theoretical judgment, but for actual metals, the opposite result is obtained, as if the carriers in these metals are positively charged. This "abnormal" Hall effect and normal Hall effect can only be satisfactorily explained by the quantum theory of electrons in metals.
This paragraph refers to college physics, Zhang Sanhui Hall Effect, page 205.