Speed is the magnitude of velocity.
Velocity depends on both magnitude as well as direction.
Since speed is constant, direction of the object must be changed to make velocity not constant or to make velocity variable.
Hope this helps, have a great day ahead!