You are confusing the classical framework of Maxwell's equations with the quantum mechanical.
For example, the electron can be viewed as a wave, just like the photon.
Both the photon and the electron are described by a wave function whose complex conjugate squared gives the probability density for the particular observation.
So, if the electromagnetic wave that the photon represents is caused by oscillating electric charges,
The photon is not an electromagnetic wave: it has a wavefunction. The classical oscillating fields emerge from an enormous number of quantum mechanical photon fields. ( for a mathematical analysis look at this link). The reason that the photons, defined in the quantum mechanical framework can build up the classical maxwell electromagnetic field is because their wave function is the solution of the quantized Maxwell equation..
then oscillating of what causes the wave that the electron represents?
The wavefunctions of electrons, positrons and the rest of massive particles in the standard model of particle physics, are based on solutions of the Dirac equation. There exists the Schrodinger-Newton equation studied as a limiting case but the analysis goes in a different direction, does not have the simple solutions which allow for the emergence of the classical electromagnetic field from the photon wavefunction.
Thus your wave analogy does not hold.