Islam practically abolished slavery. It wasn’t effective to abolish it overnight because many slaves would have perished. They did not have the means to support themselves. Islam encouraged Muslims to free slaves and sometimes compelled them to do so (like in paying a Kaffara). That’s why you see slavery ended in many Muslim societies.