I get why Hannibal lost, due to his cavalry disadvantage, his failed elephant charge, inexperienced first two lines, and the flanking of his experienced third line. However it just doesn't seem possible to me, maybe it's wishful thinking but Hannibal was ALWAYS one step ahead of the Roman's and was indefeatable. How did he let this happen. It seems like Zama was a complete failure for Hannibal and on his own territory none the less. Do you think Hannibal lost his edge after 14 years since his prime at Cannae? Was he battle weary while Scipio was just in his prime. Do you think its possible (despite how irrational it sounds) that hannibal simply gave up on his fight agaisnt Rome. Maybe he saw that after slaughtering Rome for 15 years he decided that the resolve of his fellow countryman could never defeat the perseverance of the Romans. Even if he won at Zama Rome would just create more armies or navies. Is it possible that after 15 years of hardship he gave up. And decided to attack Rome in more indirect ways, like he did after his expulsion from Carthage. I'm probaly overthinking it, it just seems that a Man who showed such creativity and deception in every other encounter would lose a battle at his own Doorstep so easily. Afterall theres much that has been pspt to history. Just because Livy recounts so much detail doesn't mean many factors have surely been forgotten.
Of course there is always more to be said but u/arte_et_labore has a very in depth post on both Hannibal's specific tactics at Zama and why he might have had the "yips" here