(I'm converting my comment to an answer.)

In SGA4 exp XI, Artin constructs a nonempty Zariski open $U\subset S$ which admits a sequence $U=U_n \to U_{n-1}\to\ldots $ which are topological fibrations with curves as fibres. Without loss of generality, these fibrations, and the base of the fibrations, can be taken to be non proper. It follows that $\pi_1(U)$ admits a finite filtration by normal subgroups such that the quotients are free and *finitely generated* (cf. YCor's comment). An easy induction shows that $\pi_1(U)$ is residually finite. Note that the base case of the induction, where $\pi_1(U)$ is free, is discussed here: Why are free groups residually finite?