Borrow the gender. Calculate the case.
A relative pronoun gets gender and number from its reference noun, but its case from its own job inside the relative clause.
Hinglish hintRelativpronomen ka gender noun se lo, lekin case relative clause mein uske kaam se chuno; verb end mein rakho.
Find the reference noun
Der Kurs is masculine singular. That gives the pronoun its gender and number—not yet its case.
Das ist der Kurs, den ich besuche.
Aha! See the common trap
Not thisDas ist der Kurs, der ich besuche.
Try thisDas ist der Kurs, den ich besuche.
Ich is the subject of besuche; the course is its masculine accusative object, so den—not der.
More examples, less guessing
Das ist der Kurs, den ich besuche.That is the course I attend.
Der Mann, der hier wohnt, ist nett.Practice the highlighted construction in another context.
Die Frau, die ich sehe, winkt.Practice the highlighted construction in another context.