Does divestment even work?

Anti-fossil fuel activists frequently point to the divestment campaign that targeted South African Apartheid is often cited as the prime exam