As posted in the comments, you can find the particular solution with
variation of parameters. On Wikipedia there is also done an example in a similar case.
Here, we want to look for the particular solution of the ODE $y''(t)+y(t)=\sin(t)$. You already derived the correct complementary solution $y_h(t)=A \cos(t)+B \sin(t)$. That means it is composed of the basis functions $u_1(t):=\cos(t)$ and $u_2(t):=\sin(t)$. The Wronskian is
$$W(t)=\begin{vmatrix} u_1(t) & u_2(t) \\ u_1'(t) & u_2'(t) \end{vmatrix}=\dots=1.$$
We denote by $f$ the right-hand side of the ODE and we compute the indefinite integrals
\begin{align}a(t) &=-\int \frac{f(t) u_1(t)}{W(t)} ~\text{d}t=\dots=-\tfrac12 t+\tfrac14 \sin(2t), \\
b(t)&=\int \frac{f(t) u_2(t)}{W(t)} ~\text{d}t=\dots=-\tfrac12 \cos^2(t),\end{align}
yielding the particular solution
$$y_p(t)=a(t) u_1(t)+b(t)u_2(t) = \dots =-\tfrac12 t \cos(t).$$