UK Prime Minister Keir Starmer has announced his resignation after just two years in office.