To put it simply, in Mechanics, Work is force multiplied by distance. The Work done in lifting a weight from the ground is equal to the weight in pounds times the height lifted in feet giving an answer in foot-pounds (using old money here!). The force you exert in lifting the weight is in opposition to the vertical force of gravity that is trying to make it drop again. How far you moved the weight horizontally doesn’t affect the work done in raising it. The force used in moving horizontally has to overcome friction and air resistance. It is easier to visualise if you think of the lifting and moving actions being performed by a crane rather than by a person.