Depends on your set theory. I will work in Zermelo-Fraenkel-with Choice below (ZFC).
What is really at issue is the problem of "proper classes".
Remember that a "module over the ring $R$" is really an ordered triple, $(M,+,\cdot)$, where $M$ is a set, $+$ is a binary operation on $M$ (that is, $+$ is a function $M\times M\to M$) and $\cdot$ is a function $\cdot\colon R\to M$, which satisfies a bunch of properties.
Technically speaking, then, if $\bullet\neq\star$, then the module $(\{\bullet\},+,\cdot)$, where $\bullet+\bullet = \bullet$ and $a\cdot\bullet=\bullet$ for all $a\in R$; and the module $(\{\star\},\oplus,\odot)$ where $\star\oplus\star=\star$ and $a\odot\star=\star$ for all $a\in R$, are different modules, because they are different as ordered triples.
That means that, because the collection of all singletons is not a set, but we can make each singleton set into a finite (hence finitely generated) $R$-module, the collection of all finitely generated $R$-modules cannot be a set. (See the Axiom of Replacement).
However, let $X$ be a set whose cardinality is the larger of $|R|$ and $\aleph_0$. Every finitely generated $R$-module is isomorphic to an $R$-module with underlying set contained in $X$ (a finitely generated $R$-module is a quotient of $R^n$ for some $n$, and the cardinality is always bounded by $\max\{\aleph_0,|R|\}$; now biject it with some subset of $X$ and use transport of structure).
Since $X$ is a set, the collection of all subsets of $X$ is a set (Axiom of the Power Set). And from this, using the Axiom of the Power Set and the Axiom Schema of Specification, one can show that the collection of all function $A\times A\to A$ over all subsets $A$ of $X$, and of all functions $R\times A\to A$ over all subsets $A$ of $X$, are also sets. And from there, the collection of all triples of the form $(A,+,\cdot)$ where $A\subseteq X$, $+\colon A\times A\to A$ is a function, and $\cdot R\times A\to A$ is a function, is also a set. And so the collection of all $R$-modules with underlying set contained in $X$ is a set.
So the collection of all $R$-modules that are both finitely generated and have underlying set contained in $X$ is also a set.
Now we can identify each equivalence class of finitely generated modules over $R$ with a particular element of this latter collection (which is actually a set), and so we conclude that the collection of equivalence classes of finitely generated modules over $R$ is actually a set (however, see Asaf's caveat below).
With this in place, what we can do formally is the following: given any finitely generated module over $R$, we know that it is isomorphic to (at least) one of the finitely generated modules in our set (those whose underlying set is a subset of $X$). So we can "pretend" that we have all finitely generated modules "on hand" by working only with those whose underlying set is contained in $X$, because the kind of properties that we are interested in are invariant under isomorphism (they only depend on the isomorphism type of the module, not on how exactly we write down the module, or the names of the elements). So, "morally", we have all finitely generated modules on hand. It's not really a set of equivalence classes (see Asaf's answer), but we do have at least one representative of any class.
And so we can breathe a sigh of relief at being guaranteed that one could, if one were really stickler for details, work entirely within set theory properly, and then promptly forget about it and speak glibly about "all $R$-modules" as if that made sense in set theory, because with a lot of work we can make it make sense.