Dear student,
Speed and velocity of an object depends upon distance and displacement respectively. Distance of two objects may be same but not displacement.
E.g.- If 2 cars A and B are moving with a speed of 40km/h but, car A is going towards north while B has not any uniform direction. Then their speed is same and velocity is different
Regards