The constellations seem to move around in the sky primarily because Earth's rotation makes the constellations appear to move. As the Earth spins on its axis, different parts of the sky come into view over time. This is why we see different constellations at different times of the night and at different times of the year.
While gravity does play a role in the overall dynamics of celestial bodies, it does not cause the apparent movement of constellations. The rotation of the Earth is the main reason for this observable phenomenon.