As far as I know, African elephants only live south to the Sahara. How did people like the Carthagenians and Numidians get elephants all the way from Sub Saharan Africa? I can't imagine them crossing the desert or even sailing with elephants.
Elephants used to live in North Africa. The exact taxonomy is a bit blurry but it seems that the famed Carthaginian war elephants were a now extinct subspecies of the African bush elephant that was native to areas north of the Sahara, particularly the Atlas mountains and highlands. It appears they became extinct in the first few centuries AD. They were almost certainly extinct by late antiquity.
Similar to how lions used to have a much larger range in recorded history, well into areas like Iran or much of India, other megafauna like elephants, tigers, leopards, etc which nowadays have very restricted wild ranges also had more sizable distributions in antiquity.