The electron has negative charge.
When an electron is bringing towards another electron, then due to same negative charge repulsive force is produced between them.
So, to bring them closer a work is done against this repulsive force.
This work is stored in the form of electrostatic potential energy.
Thus, electrostatic potential energy of system increases.
Alternative:
Electrostatic potential energy of system of two electrons U=4πε01r(−e)(−e)=4πε01re2
Thus, as r increases, potential energy U increases.