I am considering the following two isomorphisms:

First, if $X$ is a reasonably nice topological space, then $X$ has a normal covering space which is maximal with respect to the property of having an abelian group of deck transformations. The group of deck transformations of this covering space is isomorphic to the abelianizatin of the fundamental group of $X$, which can be identified with the singular homology group $H_1(X,\mathbb{Z})$.

Second, if $K$ is a number field, class field theory gives an isomorphism between the Galois group of the maximal abelian unramified extension of $K$ (the Hilbert class field) and the ideal class group of $K$. The ideal class group can be identified with the sheaf cohomology group $H^1(\mathrm{Spec}(\mathcal{O}_K),\mathbf{G}_m)$.

Given the apparent similarity between these two theorems, is there some more general theorem which implies both of these results as special cases?

twotheorems, and one bridge. Compact Riemann surfaces and global fn fields are subsumed by "geometric class field theory" of Lang-Rosenlicht (using Jacobians to classify finite abelian coverings); see Serre's book. Global fn fields and number fields are subsumed by the usual CFT (together with Kummer sequence to relate cohomology of $\mathbf{G}_m$ to that of $\mu_n$, and the link between Jacobian and Pic). So global fn fields are the bridge. Weil wrote to his sister about it. Talk to K.P. or M.Z. $\endgroup$