What was the Iran nuclear deal Trump dumped in search of ‘better’ terms?

Trump withdrew the US from the JCPOA in 2018, branding it 'the worst deal ever' and seeking stronger terms.