When proving the weak Mordell-Weil theorem for an abelian variety $A$ over a number field $K$:
One way is to prove that one has a monomorphism $A(K)/n \hookrightarrow H^1(K,A[n])$, and one can prove that the image of $A(K)/n$ in the cohomology group consists of classes unramified outside a finite set, and finish off using the finiteness of the class number and the finite generation of the unit group.
A better way is to remember the unramifiedness beforehand (so you don't have to analyse the image in $H^1(K,A[n])$): Use that $A$ can be spread out to an abelian scheme $\mathcal{A}/\mathfrak{O}_{K,S}$ over an open subset of the ring of integers of $K$. By further enlarging the finite set of places $S$, one can assume that $n: \mathcal{A} \to \mathcal{A}$ is surjective on the étale site of $\mathfrak{O}_{K,S}$ with kernel $\mathcal{A}[n]$. Now take the long exact cohomology sequence associated to $0 \to\mathcal{A}[n] \to \mathcal{A} \to \mathcal{A} \to 0$ and use the Néron mapping property $\mathcal{A}(\mathfrak{O}_{K,S}) = A(K)$ and again the finiteness of the class number and the finite generation of the unit group.