Learn verbs with their prepositions
Learn the verb, preposition and case as a unit. Warten auf takes accusative; teilnehmen an takes dative. The case in these fixed combinations is not determined by movement.
Understand the idea
Some verbs select a particular preposition and case as part of a meaning. These combinations cannot reliably be translated word for word from English. The same verb may have several constructions with different meanings.
Build it step by step
Learn the complete unit: verb, preposition, case and a short example. Warten auf takes an accusative complement in the meaning wait for; teilnehmen an takes dative. Conjugation and separable prefixes still follow the verb's ordinary rules. A question about the complement must preserve the required preposition.
See it in a sentence
Ich warte auf den Bus.
Wir warten auf eine Antwort.
A useful memory aid
Put a small case label beside the preposition when recording a verb. Review the whole phrase, not only its English translation.
A common trap
Do not choose a case by asking whether the sentence involves physical movement. A fixed verb-preposition construction is different from a freely used spatial two-way preposition.