The short version is: 9/11 happens. The Taliban offer to hand over bin Laden and George W. Bush refuses [1]. Bin Laden escapes into Pakistan. We then start a completely pointless war in Iraq against someone who played no part in 9/11. There was a letter from many conservative leaders prior to 9//1 calling for the invasion of Iraq [2]. Interestingly, then Senator Biden predicted in 1998 he'd vote to topple Saddam Hussein in 1998 [3].
There is no partisan divide on US foreign policy.
Anyway, bin Laden builds a massive compound in Abbottabad, Pakistan, about a half mile from the ISI (Pakistan's intelligence agency). Like, it stood out like a sore thumb. It was so much larger than the surrounding houses. And there he sat for years. He had no Internet access. He communicated with the outside world via couriers. Those couriers would take USB drives and travel to distant Internet cafes and such to communicate on bin Laden's behalf.
One of those couriers was identified through torture ("interrogation") of people held at Guantanemo Bay. The CIA followed said courier and found the compound in Abbottobad and, well, the rest is history.
So where does the NSA fit into this? It seems like good ol HUMINT (human intelligence) to me.
[1]: https://www.theguardian.com/world/2001/oct/14/afghanistan.te...
[2]: https://www.militarist-monitor.org/images/uploads/PNAC_Lette...
[3]: https://www.c-span.org/video/?c4842886/user-clip-1998-biden-...