Discrete random variables definition
Solution 1:
Yes, you're correct--$Y$ is the domain of the probability mass function. And adding to what user Mike Earnest has said, it's a set which contains all the possible values of $X$ (and possibly more elements), and the line $P(X\in Y)=1$ means that $X$ surely has a value which is an element of $Y$ (in other words, $Y$ contains all the possible values of $X$).
For example, let $X$ be a random variable such that $P(X=1)=P(X=2)=P(X=3)=P(X=4)=\frac14$.
The most straightforward choice of $Y$ is $\{1,2,3,4\}$. If $Y$ is chosen as such, you can see that the probability that the value of $X$ is in $Y$ is $1$, and the probability mass function of $X$ is $$p(x)=P(X=x)=\frac14\text{ for }x\in \{1,2,3,4\}\text.$$
We can also take $Y=\{0,1,2,3,4,5\}$. Then the probability mass function of $X$ is $$p(x)=P(X=x)=\cases{\frac14& for $x\in \{1,2,3,4\}$\\0&for $x\in \{0,5\}$}$$
Here the probability that the value of $X$ is in $Y$ is still $1$, but not every member of $Y$ is a possible value for $X$ (see $0$ and $5$). The point is that it is possible to choose a countable set $Y$ which comprises all the possible values of $X$.
For contrast, let's take a look at another random variable, say $Z$, which can take on any value in the interval $[0,1]$ with uniform probability distribution. Because $[0,1]$ is uncountable, we cannot choose a countable set $Y$ which contains all the possible values of $X$, because such a set would have to have an uncountable subset, that is, $[0,1]$. Therefore, $Z$ is not a discrete random variable.