A liquid can easily change its shape but a solid cannot because

The interatomic forces determine the mobility of atoms or molecules in any structure (solid or liquid). This mobility allows certain substances to change shape while prohibiting others. In solids, the interatomic forces of attraction are quite high due to which they are unable to change their shape.

1