I came across this definition of the range of a function:
For a function $f : X → Y$, the range of $f$ is $$\{y \in Y : \exists x \in X \text{ such that }f(x) = y\},$$ i.e., the set of $y$-values such that $y = f (x)$ for some $x \in X.$
I have a little doubt regarding the use of “$\exists x \in X$”. Shouldn't it be “$\forall x \in X$” instead, since the range of a function is the set of all values that $y$ can acquire, which is by mapping all $x$'s in $X$ to $Y?$
Th given set is more accurately read “the set of elements of $Y$ such that each, for some element $x$ of $X,$ equals $f(x)$” or, more simply, “the set of elements of $Y$ such that each equals some output of $f$”.
On the other hand, your suggested set $$\{y \in Y : \forall x \in X,\;\, f(x) = y\}$$ is read “the set of elements of $Y$ such that each equals every output of $f$”.
Here's a different example providing a similar contrast:
$$A=\{n\in\mathbb Z: \exists a\in\mathbb Z\;\,n=2a\}\\ =\text{the set of integers such that each one is double }\textit{some }\text{ integer}\\ =\{\ldots,-6,-4,-2,0,2,4,6,8,\ldots\}\\ =2\mathbb Z.$$
Set $A$ is populated precisely with the even integers:
$$B=\{n \in\mathbb Z: \forall a\in\mathbb Z\;\,n=2a\}\\ =\text{the set of integers such that each one is double }\textit{every }\text{ integer}\\ =\emptyset.$$
Since no integer is simultaneously twice of $-5,$ twice of $0,$ twice of $71,$ etc., the set $B$ has no member.