Consider $S \subset \mathbb{R}$. Define for all $n \in \{1,2,3,\ldots\}$
\begin{align*} S_n := \bigcup_{a \in S} \left (a - \frac{1}{n}, a + \frac{1}{n}\right) \end{align*}
Since arbitrary union of open sets is open, $S_n$ is open for all $n$.
Now \begin{align*} S = \bigcap_{n=1}^{\infty} S_n \end{align*}
Hence $S$ is the intersection of countably many open sets, therefore, it is a Borel set.
Are my steps correct or is there something wrong? If there is something wrong, could you point out which step exactly?
Your claim that $\bigcap_{n=1}^{\infty} S_n =S$ is false.
Take $S=\mathbb Q.$ Then $S_n=\mathbb R$ for all $n.$
More generally, the closure of $S$ is contained in $\bigcap S_n.$ You can prove that $\bigcap S_n=\overline S,$ but all closed sets are Borel already.