We have a theorem:
There exists a fundamental set of solutions for a homogenous linear 2th-differential equation $a_2(x)y''+a_1(x)y'+a_0(x)y=0$ on an interval $I$.
You have a second order homogenous differential equation which is linear as well. This is essential to have an independent set of solutions $\{y_1(x),y_2(x)\}$ for further aim. As you noted, there is a method in which we can construct a second solution from a known solution such that the latter set is a fundamental set (called reducing the order). It can be proved that if $y_1(x)$ is a known solution then the second one satisfying the theorem is $y_2(x)=y_1(x)\int\frac{e^{-\int\frac{a_1(x)}{a_2(x)}dx}}{y_1^2(x)}dx$
So in your equation we have $y_2=\sin(x)\int\frac{e^{\int\frac{1}{x}dx}}{\sin^2(x)}dx=\sin(x)\int\frac{x}{\sin^2(x)}dx$ $y_2=\sin(x)(-x\cot(x)+\ln(\sin(x)))=-x\cos(x)+\sin(x)\ln(\sin(x))$ Now, your general solution is as $y(x)=C_1y_1(x)+C_2y_2(x)$.