The following exercise is given in the text "Algebra Chapter 0" by Aluffi:
Construct a category of infinite sets and explain how it may be viewed as a full subcategory of Set.
Let $\infty\text{-Set}$ denote the category whose objects are all sets $X$ with $\vert X \vert=\infty$ with functions between them. Clearly it should be the case that $X,Y\in{Ob(\infty\text{-Set})}\Rightarrow \vert X \vert=\vert Y \vert=\infty$ for any pair of objects which would imply that $X\cong Y$ making $\infty\text{-Set}$ a groupoid. My reservations in claiming that the above category is a groupoid stems from the following: $\Bbb{R}$ and $\Bbb{Z}$ both have infinite cardinality but $\lnot(\Bbb{R} \cong \Bbb{Z}$) since their respective cardinalities are different sizes of infinity.
Finally my question: Given the information in the exercise, can I conclude that $\infty\text{-Set}$ is a Groupoid or would one need to add that the objects are restricted to countably infinite sets or something like that? Thanks.
You have several points of confusion.
First, $|X|=\infty$ is really just an abbreviation for "$X$ is infinite", and should not be read literally. There is no cardinal number "$\infty$", since infinite sets have many different cardinalities, and so you cannot say that if $|X|=\infty$ and $|Y|=\infty$ then $|X|=|Y|$. Really, the notation $|X|=\infty$ is usually not used except in contexts where you care mainly about finite sets, and so you want to distinguish that a set is infinite in contrast to them.
Second, to say that a category is a groupoid does not mean that any two objects are isomorphic. Rather, it means that every morphism is an isomorphism. It is possible to have a category in which any two objects are isomorphic, but not every morphism is an isomorphism (between any two objects there exists an isomorphism, but there also exist other morphisms which are not isomorphisms). So for instance, even if you restricted to the category of countably infinite sets, you would not have a groupoid, because not every function between two countably infinite sets is a bijection. It is also possible to have a groupoid in which not all objects are isomorphic, since you can have two objects with no morphisms between them at all.