How to create object distortion animation when hovering

When you hover over an object, it sort of sticks to the mouse and distorts a little, after which it smoothly returns to the reverse position. I gave an example in the screenshots below.