how should we determine the range of functions........

that is all the values of f(x) for x in the domain of f.

For example,

y = 3x-4 has domain all reals. Also the range is all reals, since you can find an x for any y chosen.

y = x^2-5 has domain all reals, but the range is only [-5,∞) since x^2 is always positive, and -5 is as small as y can get. But for any y >= -5 you can find a corresponding x.