Another interesting wrinkle in the Iran situation is the JCPOA. Trump tore that agreement up in 2018 after his administration certified that the Iranians were in compliance with it twice. That agreement left many problems to solve, but one thing is for sure: if that agreement had been left in place and the Iranians continued to follow it, they wouldn't have the stockpile of nuclear material they do now.
https://2009-2017.state.gov/e/eb/tfs/spi/iran/jcpoa/