I am just verifying,
Is the function $f(x) = \tan(x)$ onto but not one to one?
Yes. It is onto the set $\mathbb R\cup\{\infty\},$ where $\text{“}\infty\text{''}$ is neither $+\infty$ nor $-\infty$ but rather the single $\text{“}\infty\text{''}$ that is approached by going either in the positive or in the negative direction.
It is locally one-to-one at every point. That means that about every point $x$ in its domain there is some open interval $(x-\varepsilon,x+\varepsilon)$ such that the restriction of the tangent function to that interval is one-to-one.
But the tangent function is not one-to-one. There are many points $x$ in its domain for which $\tan x = 1.$ And many for which $\tan x=2,$ etc.
By contrast, the sine function is not locally one-to-one at $\pi/2.$ No matter how small you make $\varepsilon$, the restriction of the sine function to the interval $(\pi/2-\varepsilon,\pi/2+\varepsilon)$ is not one-to-one.