Prime Minister Pedro Sanchez conceded defeat after the conservative People's Party and the far-right Vox party secured a majority of seats in the lower house of parliament.