Humza Yousaf’s decision to end the SNP’s governing deal with the Scottish Greens was “catastrophic” and "wrong", former first minister Nicola Sturgeon has said.