A liquid can easily change its shape but solids cannot because
The forces between the molecules are stronger in solids than in liquids.
Intermolecular forces are stronger in solids as compared to liquid and gases, as a result of which a solid cannot change its shape without a strong external force.