Conservatives suffered a record defeat as the Labour Party swept into power and Keir Starmer took over as prime minister.