As Wojowu already pointed out $\mathsf{RCA}_0$ proves recursion theorem. You could find a proof in Simpson's book [1], Section II.3.
In fact primitive recursion theorem is equivalent to $\Sigma^0_1\textsf{-Ind}$ over $\mathsf{RCA}_0^{\star}$. Here $\mathsf{RCA}_0^{\star}$ is $\mathsf{EA}+\Delta^0_1\text{-}\mathsf{CA}+\Delta^0_0\text{-}\mathsf{Ind}$ and $\mathsf{RCA}_0=\mathsf{RCA}_0^{\star}+\Sigma^0_1\text{-}\mathsf{Ind}$. So we need to prove in $\mathsf{RCA}_0^{\star}+\mathsf{PrimRec}$ any given instance $$\exists y\;\varphi(0,y)\land \forall x\;(\exists y\;\varphi(x,y)\to \exists y\;\varphi(x+1,y))\to \forall x\;\exists y\varphi(x,y)$$ of $\Sigma^0_1\textsf{-Ind}$, where $\varphi$ is $\Delta^0_0$.
Indeed let us reason in $\mathsf{RCA}_0^{\star}+\mathsf{PrimRec}$. We assume $\exists y\;\varphi(0,y)\land \forall x\;(\exists y\;\varphi(x,y)\to \exists y\;\varphi(x+1,y))$ and claim $\forall x\;\exists y\varphi(x,y)$ and claim that $\forall x\exists y\varphi(x,y)$. Using $\Delta^0_1\textsf{-CA}$ and premise of induction we form the following function $g(x)$: $$g(x)=\begin{cases}\langle y_0,\ldots,y_{n-1},\min\{y_{n}'\mid \varphi(n,y_{n})\}\rangle &\text{, if $x=\langle y_0,\ldots,y_{n-1}\rangle$ and}\\ & \text{$\;\;\;$ $\varphi(i,y_i)$, for all $i< n$}\\ 0&\text{, otherwise}\end{cases}$$ We applying primitive recursion to $g$ and put $f(0)=\langle \rangle$. The resulting $f$ maps $n$ to a sequence $\langle y_0,\ldots,y_{n-1}\rangle$ such that $\varphi(0,y_0),\ldots,\varphi(n-1,y_{n-1})$. Note that the latter fact could be verified by $\Delta^0_0\textsf{-Ind}$. Thus we prove the instance of $\Sigma^0_1\textsf{-Ind}$.
[1] Simpson, S. G. (2009). Subsystems of second order arithmetic (Vol. 1). Cambridge University Press.