If a verb ends with one of these sounds p, f, k, s, sh, ch, then "ed" sounds like t. These consonant sounds are unvoiced.
If a verb ends with a t sound or a d sound, then pronounce "ed" like this "ə d".
If a verb ends with a vowel sound or a voiced consonant, which would be any other consonant sound not listed so far, then "ed" sound like d.
You might want to tell the teacher this, as well.
Student or Learner