Dear Student,
The intermolecular forces of attraction in solids is very strong, due to which the constituting particles are very closely packed, this closed packing in solids give it a definite shape, but in liquids the intermolecular forces are weak, due to which the constituting particles are loosely packed, and hence the liquids do not have a fixed shape.
Regards