Why does Newton's cradle stop?
The balls are not perfectly elastic, but the main reason is probably air.
When 2 adjacent balls have any distance between them, there is air in the space. When the moving neighbor comes at a stationary ball the moving ball has to push the air out of the way.
I hope this helps,