The relation between work, force, distance and angle between the two is:
W = (F) (S) cos θ
Where,
(W) - Work done
(F) - Force
(S)- Displacement
(θ)- Angle between force and displacement
When the force is perpendicular to the direction of motion, and hence, the work done is also zero.
When the direction of force is similar the direction of motion, and hence, the work done is maximum.