When a glass vessel falls from a height on a hard floor, it comes to rest almost instantaneously (i.e., in a very short time) so the floor exerts a large force on the vessel and it breaks.
But, if the glass vessel falls on a carpet, the time duration in which the vessel comes to rest, increases and so the carpet exerts a less force on the vessel and it does not break.