Scenario: A student pulls a book off a shelf to examine it and places it back in the same spot on the bookshelf.

Was work (physics) done in this scenario?

No, work (physics) was not done in this scenario. Work in physics is defined as the product of force and displacement in the direction of the force. In this case, the student simply pulled the book off the shelf and placed it back without moving it in a specific direction or over a distance, so no work was done.