Prime Minister Pedro Sánchez says the move will protect children from the "digital Wild West".