Britain’s two main parties suffered significant losses in municipal and mayoral votes as Reform U.K., a right-wing populist party, surged ahead.