Proposition 3 and Proposition 4 below takes care of what Ittay Weiss left as an exercise in his answer.
Proposition 1: Let $h : \mathbb{N} \to S$ be a surjective mappping that is injective on the initial segment $[0,n]$. If $h([0,n]) \ne S$ then there exist a surjective $h^{'} : \mathbb{N} \to S$ that agrees with $h$ on $[0,n]$ and is injective on $[0,n+1]$ satisfying $h([0,n+1]) \subset h^{'}([0,n+1]) $.
Proof
Let $m \gt n$ be smallest integer such that $h(m) \notin h([0,n])$. If $m = n+1$ then $h$ restricted to $[0,n+1]$ is injective and there is nothing to do. Otherwise, the transposition $\sigma = (n+1 \;\;\;\; m)\;$ is a (simple) bijective transformation of $\mathbb{N}$. It is easy to argue that defining $h^{'} = h \circ \sigma$ completes the proof. $\qquad \blacksquare$
Definition: A surjective mapping $f : \mathbb{N} \to S$ is said to be surjective at infinity if for all $n \in \mathbb{N}$ $f([0,n]) \ne S$.
Proposition 2: Let $h : \mathbb{N} \to S$ be surjective at infinity and injective on the initial segment $[0,n]$. Then there exist a surjective at infinity function $h^{'} : \mathbb{N} \to S$ that agrees with $h$ on $[0,n]$ and is injective on $[0,n+1]$ satisfying $h([0,n+1]) \subset h^{'}([0,n+1])$.
Proof: Adapt the proof of Proposition 1 to this setting.
Proposition 3: Let $f : \mathbb{N} \to S$ be surjective at infinity. Then there exists a bijective correspondence between $\mathbb{N}$ and $S$.
Proof
Let $f_0$ denote $f$, a trivially injective function on the singleton $[0,0]$.
By the above arguments, it is easy to see that there is a sequence of functions $f_n$ each injective on the initial segment $[0,n]$. Let ${f_n}^{'}$ denote $f_n$ restricted to $[0,n]$. Everything is in place to take the inductive (direct) limit of the ${f_n}^{'}$, defining a function $\bar f : \mathbb{N} \to S$. It is easy to check that $\bar f$ is a bijection. $\qquad \blacksquare$
Proposition 4: Let $f: \mathbb{N} \to S$ be surjective and $N \ge 0$ be given so that $f([0,N]) = S$. Then there exist a $n \le N$ and a bijective function $\bar f$ that maps $[0,n]$ to $S$.
Proof: Exercise.