The photon's energy is used for the electron's work function and for its kinetic energy.
Symbols
h
Planck's constant
[J·s]
f
frequency of light
[Hz]
W
work function
[J]
Ek
kinetic energy of the electron
[J]
Where it comes from
A photon ejects an electron from a metal only when its energy exceeds the work function. The surplus becomes the electron's kinetic energy. Below the threshold there is no effect, regardless of the light intensity.