There are three rules. Click on the link and learn.
https://www.englishclub.com/pronunciation/-ed.htm
[youtube]https://www.youtube.com/watch?v=j32SurxnE4s[/youtube]
Pronunciation games: https://www.englishclub.com/esl-games/pronunciation/matching-ed.htm