Sir Keir Starmer said he was leaving the country in a better place than it was when he took office two years ago.