The UK will have its fourth prime minister in just over three years after Liz Truss's ill-fated premiership finally crashed on Thursday.