I'd say the right thing to do is to not look at Galois cohomology but étale cohomology instead, by geometrizing the situation. Let me explain. Let $U=\mathrm{Spec}(\mathcal{O}_{K,S})$ and denote $\eta=\mathrm{Spec}(K)$ its generic point. We have $\pi_1(U,\bar{\eta})=G_{K,S}$ and $M$ corresponds to a constructible (locally constant) sheaf on $U$. Using [1, Prop 2.9] we have $H^i(U,F)(l)=H^i(G_{K,S},M)(l)$ for all $l$ invertible on $U$.

The Galois cohomology groups are actually kind of bad to define an Euler characteristic as they are non-zero in arbitrary high degree and one has to artificially cut off. The problem is the same for étale cohomology of a constructible sheaf, but one can introduce a compactly supported cohomology (taking into account behavior at archimedean places) $H^\ast_c(U,F)$ for sheaves on $U$ that behaves better. The groups are the cohomology groups of the complex $R\Gamma_c(U,F)$ defined by the fiber sequence
$$
R\Gamma_c(U,F) \to R\Gamma(U,F) \to \prod_{v\in S} R\Gamma(K_v,F_v)
$$
where $K_v$ is the henselization at $v$ of $K$ if $v$ is non-archimedean, the completion if $v$ is archimedean, $R\Gamma(K_v,-)$ is Galois cohomology and $F_v$ is the $G_{K_v}$-module corresponding to the pullback of $F$ to $\mathrm{Spec}(K_v)$. This is a variant of the compactly supported cohomology of [1] that is actually bounded for $\mathbb{Z}$-constructible sheaves:

> Proposition:
> If $F$ is a $\mathbb{Z}$-constructible sheaf on $U$, the groups $H^i_c(U,F)$ are $0$ for $i\neq 0,1,2,3$ and finite type for $i=0,1,2,3$. If $F$ is constructible then they are finite.

A good alternative to the global Euler characteristic of Tate is then
$$
\chi_{c,U}(F)=\prod_i [H^i_c(U,F)]^{(-1)^i}
$$
where $[-]$ denotes cardinality.
It turns out that $\chi_{c,U}$ extends to an Euler characteristic $\chi_{W,U}$, the Weil-étale Euler characteristic, valued in $\mathbb{Q}_{>0}$ and defined for all $\mathbb{Z}$-constructible sheaves on $U$.

Let me invoke a powerful theorem of Swan:
> Theorem [2, Cor. 1]: Let $G$ be a finite group. Then the kernel of $K_0(\mathbb{Z}[G]) \to K_0(\mathbb{Q}[G])$ is finite.

Now from a formal dévissage argument using explicit computations for sheaves supported on closed points and the theorem, it follows that $\chi_{W,U}(F)=\chi_{c,U}(F)=1$ for a constructible sheaf $F$. In my view, this is the right generalization. Note that if $F$ is constructible locally constant, corresponding to a $G_{K,S}$-module $M$ such that $l$ is invertible on $U$ for each $l$ dividing the order of $M$, then $H^i(U,F)=H^i(G_{K,S},M)$ and the statement $\chi_{c,U}(F)=1$ is equivalent, after unwinding the definitions, to the formula for the global Euler characteristic (thus by a dévissage one can also prove that $\chi_{c,U}(F)=1$ for $F$ constructible by reducing to the above case and the case of a sheaf supported on a closed point).

Since the groups $H^i_c(U,F)$ are finite, the groups $H^i(U,F)$ are also finite because Galois cohomology of $\mathbb{R}$ and of p-adic fields/henselian local fields of number fields with finite coefficients is finite. We can thus define for $F$ constructible:
$$
\chi_U(F)=\prod_{i=0}^3 [H^i(U,F)]^{(-1)^i}
$$
and the equality $\chi_c(U,F)=1$ becomes:
$$
\chi_U(F)=\prod_{v\in S} \prod_{i=0}^3[H^i(K_v,F_v)]^{(-1)^i}=\prod_{v~\text{finite}} \chi_v(F_v) \prod_{v~\text{archimedean}} \frac{[H^0(K_v,F_v)]}{[\hat{H}^0(K_v,F_v)]}
$$
where $\hat{H}^i(K_v,-)$ for $v$ archimedean denotes Tate cohomology and $\chi_v$ is the local Euler characteristic (I have used that the Herbrand quotient of a finite module is $1$). Using the computation of the local Euler characteristic [1, I.2.8] and the product formula, we find
$$
\chi_U(F)= \prod_{v~\text{archimedean}} \frac{[H^0(K_v,F_v)]}{[\hat{H}^0(K_v,F_v)]|[M]|_v}
$$
where $M$ is the $G_K$-module corresponding to the stalk $F_\eta$ at the generic point and $|-|_v$ is the normalized norm associated to the archimedean place $v$.
In the case where $mF=0$ for $m$ invertible on $U$ this is [1, II.2.13].

When the invertibility condition for a locally constant constructible sheaf $F$ does not hold, the relation between $H^\ast(U,F)$ and $H^\ast(G_{K,S},M)$ is more complicated (and  I don't even know if the latter are finite!): let $\bar{U}$ denote the normalization of $U$ in the fixed field of $G_{K,S}$. Then you have a spectral sequence
$$
H^p(G_{K,S},H^q(\bar{U},F))\Rightarrow H^{p+q}(U,F)
$$
One can say that $H^0(\bar{U},F)=M$, $H^1(\bar{U},F)=0$ and $H^i(\bar{U},F)(l)=0$ for $i\geq 0$ if $l$ is invertible on $U$ (see [1, the proof of I.2.9]); beyond that I don't know what can be said.

*Side note: a lot of what I said is studied in my article [Special values of L -functions on regular arithmetic schemes of dimension 1][3]. I apologize for the self-plug but I feel like it was kind of inevitable*

[1] <cite authors="Milne, J. S.">_Milne, J. S._, [**Arithmetic duality theorems**](http://www.jmilne.org/math/Books/adt.html), Charleston, SC: BookSurge, LLC (ISBN 1-4196-4274-X/pbk). viii, 339&nbsp;p. (2006). [ZBL1127.14001](https://zbmath.org/?q=an:1127.14001).</cite>

[2]<cite authors="Swan, R. G.">_Swan, R. G._, [**The Grothendieck ring of a finite group**](http://dx.doi.org/10.1016/0040-9383(63)90025-9), Topology 2, 85-110 (1963). [ZBL0119.02905](https://zbmath.org/?q=an:0119.02905).</cite>


  [3]: https://arxiv.org/abs/2108.00811