Submodules of finitely generated modules

I was reading Hungerford's Algebra and I read the next proposition (they present it as a corollary):

Let $R$ be a PID. If $A$ is a finitely generated $R$-Module generated by $n$ elements, then every submodule of $A$ may be generated by $m$ elements with $m \leq n.$

I was trying to prove it, but I don't know how to proceed. I know that since $R$ is PID, it is also noetherian, so any submodule of $A$ must be finitely generated, the only thing I'm missing is to prove that it is generated by $m\leq n$ elements. I've seen that some people use the primary desomposition, but I don't know anything about it. My first instinct was to try induction over the number of generators of $A$, but I don't seem to get anywhere.

Let $M$ be an $R$-module generated by $n$elements, and let $N$ be a submodule of $M.$
Assume that you know the desired result is true when $M$ is free (I will handle this case later). Now, for a general $M$, you have an isomorphism $M\simeq A^n/P$, where $P$ is a submodule of $A^n.$ Then submodules of $M$ corresponds via this isomorphism to submodules of $A^n/P$. These submodules have the form $N'/P$ where $N'$ is a submodule of $A^n$ containing $P.$ By the case of free modules, $N'$ is generated by $m\leq n$ elements, and thus so is $N'/P$. Hence, it is also true for the submodules of $M.$
It remains to handle the case where $M$ is free.We will proceed by induction on the rank $n$ of $M$. If $n=0$, then $M=0$ and there is nothing to do. Now assume the result true for any free module of rank $n$, and let $M$ be a free module of rank $n+1$. Fix a basis $(e_1,\ldots,e_{n+1})$ of $M$.
Let $N$ be a submodule of $M$ and let $(x_j)_{i\in J}$ be a family of generators of $N$. We have $$x_{j}=\sum_{i=1}^{n+1} a_{ij}\cdot e_i \mbox{ for all }j\in J.$$ Let $\mathfrak{a}$ be the ideal generated by the $a_{n+1 \ j},j\in J$.Since $R$ is a PID, we have $\mathfrak{a}=(a)$. We may write $$a=\sum_{j\in J} \lambda_j a_{n+1 \ j},$$ where the $\lambda_j's$ are all zero, except for a finite number of them. Set $$y_0=\sum_{j\in J} \lambda_j\cdot x_j\in N.$$ Then, the $(n+1)$-th coordinate of $y_0$ is $a$. One may also write $a_{n+1 \ j}=\mu_j a$, and thus the submodule $N'$ generated by the elementss $x_j-\mu_j y_0,j\in J$ is a submodule of $M'=Re_1\oplus\cdots\oplus Re_n$, which is free of rank $n$. By induction hypothesis, $N'$ is generated by $y_1,\ldots,y_m\in N'\subset N, m\leq n.$ One deduce easily that $x_j$ is a linear combination of $y_0,y_1,\ldots,y_{m}$. Hence, $N$ is generated by the $m+1\leq n+1$ elements $y_0,\ldots,y_{m}$. This finishes the induction step, and the proof.