Yes, the gravitational force is 90 degrees to the displacement of the object, when the object is on a flat horizontal surface. The gravitational force therefore does no work on the object, because cosine 90 degrees equals zero.
so the formula for work was dot product all along it was always cosine sheesh took me a while to get it lol. Work is scalar and not vector. That's why trigo doesn't quite work with it XD