Method: tabulate $Z$ and $N$ against the shell-closure list.
The nuclear shell model predicts extra binding whenever a shell of protons or neutrons is completely filled. The filled-shell counts are $2, 8, 20, 28, 50, 82, 126$. Doubly magic means both counts land on this list at once.
Work out $N = A - Z$ for each option and check it:
$^{18}\mathrm{O}$: $Z=8$ hits the list, but $N=10$ misses. Single.
$^{48}\mathrm{Ca}$: $Z=20$ hits, and $N=28$ hits. Double.
$^{124}\mathrm{Sn}$: $Z=50$ hits, but $N=74$ misses. Single.
$^{204}\mathrm{Pb}$: $Z=82$ hits, but $N=122$ misses; the doubly magic lead isotope is $^{208}\mathrm{Pb}$ with $N=126$, not this one. Single.
Only calcium-48 clears both boxes, so it is the doubly magic nucleus. Its unusually high binding energy per nucleon and its use as a stable, neutron-rich target both trace back to this closed proton and neutron shell structure.
\[\boxed{^{48}\mathrm{Ca}}\]