Pope Leo XIV has said artificial intelligence is one of the main challenges facing humanity as he outlined his vision for the papacy.