When a ball rolls down an inclined plane, it gains speed because of gravity. When rolling up, it loses speed because of gravity.
Why doesn’t gravity play a role when it rolls on a horizontal surface?