Dear student,
According to the first law of motion when an object is in rest it remains in rest or when an object is in motion it remains in motion until or unless an external force applied on it.
Here in the case of rolling of the ball the direction of force i.e, frictional force applied to it is opposite to the direction of motion. Due to this force acting backwards the ball stops.
Regards