I am reading Vakil's algebraic geometry. There is an exercise:
Suppose $X$ is a smooth projective surface, $K_{X}$ is a divisor corresponding to $\omega_{X}$. Then prove
(a) (adjunction formula) $\mathrm{C} \cdot\left(\mathrm{K}_{\mathrm{X}}+\mathrm{C}\right)=2 \mathrm{p}_{\mathrm{a}}(\mathrm{C})-2$.
(b)(Riemann-Roch for surfaces)$$ \chi\left(X, \mathscr{O}_{X}(\mathrm{D})\right)=\mathrm{D} \cdot\left(\mathrm{D}-\mathrm{K}_{X}\right) / 2+\chi\left(X, \mathscr{O}_{X}\right) $$ for any Weil divsor $D$
For the part $(a)$, since $\mathrm{C} \cdot\left(\mathrm{K}_{\mathrm{X}}+\mathrm{C}\right)=\left.\operatorname{deg}_{\mathrm{C}} \mathscr{O}_{\mathrm{X}}(\mathrm{\mathrm{K}_{\mathrm{X}}+\mathrm{C}})\right|_{\mathrm{C}}$ and $2 \mathrm{p}_{\mathrm{a}}(\mathrm{C})-2=\mathrm{deg}_{C}(\omega_{C})$, I think that $\mathscr{O}_{X}(\mathrm{K}_{X}+C)|_{\mathrm{C}}=\omega_{X}\otimes\mathscr{O}(C)|_{\mathrm{C}}=\omega_{C}$. However, until now, Vakil seems does not define $\omega_{X}$ exactly, so I do not know how to prove it. I think maybe we need to use Serre's duality.
For the part $(b)$, I first want to prove it by assuming $D$ just a curve, and then by induction to get general case. But the same reason, I do not understand $\omega_{X}$ very well, so I do not know how to prove it.
I am struggling for this two problems for several hours. I hope you could help me. Thank you very much.
First, the canonical line bundle $\omega_X$ is $$det(\Omega_{X/k}).$$
Where $\Omega_{X/k}$ is the sheaf of differentials (notice that it is a vector bundle of rank $2$ in your case).
EDIT : I added more explanations to answer your question.
$\textbf{Definition of } \mathcal{O}_C(C)$ :
By definition of the restriction, $$\mathcal{O}_C(C)=\mathcal{O}_X(C) \times_X C$$ to visualize this more geometrically, you can consider a divisor $D\neq C$ linearly equivlent to $C$ with no coefficient in $C$. Then, $\mathcal{O}_X(C)=\mathcal{O}_X(D)$ and therefore $$\mathcal{O}_C(C)=\mathcal{O}_C(D). $$
$\textbf{Riemann Roch for curves}$
Let $C$ be a smooth curve and $D$ a divisor on $C$, then $$\chi(C,\mathcal{O}_C(D))=deg(D)+\chi(C,\mathcal{O}_C)$$
Moreover, $\chi(C,\mathcal{O}_C)=1-p_a(C).$
Suppose $D$ is effective, the first statement comes from the exact sequence $$0\rightarrow \mathcal{O}_C \rightarrow\mathcal{O}_C(D) \rightarrow \mathcal{O}_D\rightarrow 0.$$
The non-effective case is an exercise (hint write $D=E-F$ and use the exact sequence $$0\rightarrow \mathcal{O}_C(-F) \rightarrow \mathcal{O}_C \rightarrow \mathcal{O}_F \rightarrow 0.)$$
The second statement is a consequence of Serre's duality (exercise).
$\textbf{Answer to your original question}$
When this is not possible you have to trust the more abstract definition.
Now to answer your first question you are on the right track ; to prove $$\omega_C=(\omega_X \otimes \mathcal{O}(C))|_C$$ you have to use the general adjunction formula : https://en.m.wikipedia.org/wiki/Adjunction_formula which is also explained in Harshorne II.8.
For the second part, you have the exact sequence $$0\rightarrow \mathcal{O}_X \rightarrow \mathcal{O}_X(C) \rightarrow \mathcal{O}_C(C)\rightarrow 0$$
Therefore what you want to prove is equivalent to $$\chi(C,\mathcal{O}_C(C))=C \cdot (C-K_X)/2$$
which follows from Riemann Roch for curves and the adjunction formula.