They didn’t got rid of slavery, they got rid of chattel slavery (with the State paying massive amounts of money to the slave owners) and replaced it with a different kind based on debt.
Just like the idea that Britain isn’t racist, the idea that Britain were the first to end slavery is Image Management Propaganda Bollocks anchored on misrepresenting what actually happens.