I've heard multiple times that the main difficulty of Grothendieck duality is that triangulated categories don't 'glue well'.
In my view, there are 3 parts in understanding Grothendieck duality:
- We have to prove the existence of a right adjoint $f^!$ of $\mathsf{R}f_*$.
- We have to be able to compute this adjoint. This means establishing relative / absolute purity results and computing the counit of the adjunction.
- Proving a coherence result.
(I'll explain in detail what this all means afterwards, for those unfamiliar.) The first part was hard in Residues and Duality but is really simple today using Brown representability. The second part seems to have been recently simplified (vide Neeman's Grothendieck duality made simple), but not with homotopical tools. And the third part seems to be basically an open problem, as far as I know. (But I would love to be wrong!)
Well... now we have the machinery of stable $\infty$-categories, making $X\mapsto \mathsf{D}_{\text{qc}}(X)$ a sheaf and giving us a nice theory of descent. This seems the perfect solution to the problem described in the first paragraph of this question. So, precisely, what points became easier?
Explanation of the parts above. Point 1 seems fairly clear. The computation of the mysterious function $f^!$ is usually divided as follows: we prove that, in favorable cases, $f^!(-)\cong \mathsf{L}f^*(-)\otimes f^!\mathcal{O}_S$ (this is a relative purity result) and we compute $f^!\mathcal{O}_S$ (this is an absolute purity result). Then, the counit of the adjunction gives us a map $$\hom(M,f^!N)\xrightarrow{\mathsf{R}f_*} \hom(\mathsf{R}f_*M,\mathsf{R}f_*f^!N)\xrightarrow{\hom(-,\varepsilon)} \hom(\mathsf{R}f_*M,N).$$ (A priori we should also describe the morphism going on the other way, but people are usually happy with just this one.) Finally, we have a lot of functors, and they should all satisfy the (sometimes) obvious coherence relations (i.e., commuting diagrams). A coherence result would prove that all diagrams that should commute, commute.