Let $\mathbb{P}$ be the set of all prime numbers.
$\mathbb{P} \subsetneq \mathbb{N}$
Then you need to prove that $\mathbb{P}$ is infinite.
Suppose it is finite.
Let $p = 1 + \prod\limits_{i \in \mathbb{P}} i \in \mathbb{N}$
$\forall k \in \mathbb{P}, k \nmid p$ because otherwise, since $k \mid \prod\limits_{i \in \mathbb{P}} i$, $i \mid p - \prod\limits_{i \in \mathbb{P}} i$, ie $p \mid 1$ which is absurd.
So $p \in \mathbb{P}$. Absurd.
So $\mathbb{P}$ is infinite.
(At this point, you probably can say something like "$\mathbb{P}$ is infinite and in $\mathbb{N}$ hence countably infinite so you can get a bijection from $\mathbb{N}$ to $\mathbb{P}$. But I haven't learned that kind of things yet so I'm not sure...)
Then, since $\mathbb{P} \subset \mathbb{N}$, $\forall X \subset \mathbb{P}, \min( X )$ exists.
Let $X_0 = \mathbb{P}$ and $\forall n \geq 1, X_n = X_{n-1} \setminus \{ \min( X_{n-1}) \}$
Then you can use $\forall n \in \mathbb{N}, f(n)=min(X_n)$.