I have seen it stated that for an open subset $Y\subseteq X$ such that $X$ is a compact Hausdorff space we get an identification of the $C^*$-algebras : $C(X\setminus Y)\cong C(X)/C_0(Y)$.
I suppose that this relies on the Tietze extension theorem but I fail to connect the dots.
How do I realize this?
Because $Y$ is open, $X\setminus Y$ is compact. As you say, Tietze's extension theorem applies and given $f\in C(X\setminus Y)$ there exists $\tilde f\in C(X)$ with $\tilde f|_{X\setminus Y}=f$ and $\|\tilde f\|=\|f\|$.
The natural thing seems to define a $*$-epimorphism $C(X)\to C(X\setminus Y)$ such that its kernel is $C_0(Y)$. That is we consider $\gamma:C(X)\to C(X\setminus Y)$ to be the restriction map. Tietze's Extension Theorem, as mentioned above, guarantees that $\gamma$ is surjective. Is is straightforward that it is a $*$-homomorphism.
Finally, if $\gamma(f)=0$, then $f|_{X\setminus Y}=0$. So $f$ is continuous on $Y$ and takes the value $0$ on $\partial Y$. This means that the restriction of $f$ to $Y$ is in $C_0(Y)$; indeed, given $\varepsilon>0$, the open set $V=|f|^{-1}[0,\varepsilon)$ is open and contains $X\setminus Y$, and its complement is a compact subset of $Y$ such that $|f|<\varepsilon$ outside of it.