Let $x=3$ and $y=3$. Then $\tan\theta = \frac{3}{3} = 1$.
However if we use pythagorean theorem to find the value of hypotenuse and $\sin$ or $\cos$ function we get very different value. Here it is:
$$\text{hypotenuse} = \sqrt{3^2 + 3^2} = \sqrt{18} = 3\sqrt{2}\\ \sin\theta = \frac{3}{3\sqrt{2}} = \frac{1}{\sqrt{2}} \text{ or:}\\ \cos\theta = \frac{3}{3\sqrt{2}} = \frac{1}{\sqrt{2}} $$
What I am doing so horribly that getting such a wrong result? I think this is wrong because the value of $\theta$ should be equal regardless of trig function as long as the value of $x$, $y$ and $r$ are the same.
There is nothing wrong here, you have a triangle with sides $3,3,3\sqrt 2$. Its angle $\theta$ (the $45$ degree one) has $\tan(\theta)=1$ and $\cos(\theta)=\sin(\theta)=\frac{1}{\sqrt2}$
The value of theta is quite constant, in fact it is $45°$ in degrees or $\frac\pi4$ in radians. It is true, of course, that $\tan(\theta)\neq \sin(\theta)$, but that is nothing unusual.