[guided]The purpose of this step is to replace a possibly uncountable union of null open sets by a countable one. Countable additivity only directly controls countable unions, so the metric compactness hypothesis is used exactly here.
We first prove that $K$ has a countable base. Since $K$ is compact, the open cover
\begin{align*}
\{B(x,1/m):x\in K\}
\end{align*}
has a finite subcover for every $m\in\mathbb{N}$. Choose a finite set $A_m\subset K$ such that
\begin{align*}
K=\bigcup_{a\in A_m} B(a,1/m).
\end{align*}
Define
\begin{align*}
A=\bigcup_{m=1}^{\infty} A_m.
\end{align*}
This set is countable because it is a countable union of finite sets. It is dense in $K$: if $x\in K$ and $\varepsilon>0$, choose $m\in\mathbb{N}$ with $1/m<\varepsilon$; then some $a\in A_m$ satisfies $x\in B(a,1/m)$, hence $d(x,a)<\varepsilon$.
Now define
\begin{align*}
\mathcal{B}_0=\{B(a,r): a\in A,\ r\in\mathbb{Q},\ r>0\}.
\end{align*}
This family is countable because $A$ and the positive rationals are countable. It is a base: if $O\subset K$ is open and $x\in O$, choose $\varepsilon>0$ such that $B(x,\varepsilon)\subset O$. Choose $a\in A$ with $d(x,a)<\varepsilon/4$ and choose $r\in\mathbb{Q}$ with
\begin{align*}
d(x,a)<r<\varepsilon/2.
\end{align*}
Then $x\in B(a,r)$. Also, if $y\in B(a,r)$, the triangle inequality gives
\begin{align*}
d(y,x)\le d(y,a)+d(a,x)<r+\varepsilon/4<\varepsilon,
\end{align*}
so $B(a,r)\subset B(x,\varepsilon)\subset O$.
For each $x\in K\setminus S$, the definition of $S$ gives an open neighbourhood $U_x\subset K$ of $x$ with $E(U_x)=0$. Since $\mathcal{B}_0$ is a base, choose $B_x\in\mathcal{B}_0$ such that
\begin{align*}
x\in B_x\subset U_x.
\end{align*}
Because $B_x\subset U_x$, the projection-valued measure multiplication rule gives
\begin{align*}
E(B_x)=E(B_x\cap U_x)=E(B_x)E(U_x).
\end{align*}
Since $E(U_x)=0$, it follows that $E(B_x)=0$. Thus every point of $K\setminus S$ is covered by a member of the countable base which is also $E$-null. Listing the distinct chosen base elements gives a sequence $(V_n)_{n=1}^{\infty}$ of open sets such that
\begin{align*}
K\setminus S=\bigcup_{n=1}^{\infty} V_n
\end{align*}
and $E(V_n)=0$ for every $n\in\mathbb{N}$.[/guided]