All grammarA2
The sentence bracket
The rule
When a verb has two parts, the conjugated part is in position 2 of a statement and the second part, such as an infinitive, a participle or a prefix, goes to the end.
The two parts frame the rest of the clause like a bracket: a modal verb and an infinitive (muss … schreiben), the Perfekt (habe … geschickt), a separable verb (schalte … aus), and könnte or würde with an infinitive. Everything else goes in between.
In a yes/no question the conjugated part comes first, and the second part still goes to the end: Könntest du mich anrufen?
After dass, weil, ob and wenn the bracket closes: the conjugated verb goes to the end too, as the last word.
Examples
Ich muss heute eine E-Mail schreiben.
I have to write an e-mail today.
Ich habe dir eine Nachricht geschickt.
I've sent you a message.
Ich schalte den Computer aus.
I switch off the computer.
Könntest du mich anrufen?
Could you call me?