Words ending in ed are difficult.
There are three different ways to pronounce them
There are rules but I believe the best way to learn the pronounciation is by example. To listen! To copy. To practice.
I will post the rules but first watch this video. I hope it helps.