ことだ・ものだ: the difference
ことだN3
Meaning
Should, Ought
Past papers
Example
今回は、相手を信じてみることだ。
This time, you should try trusting them.
ものだN3
Meaning
Supposed to, Should, That's the way it is
Past papers
Tested once in past papers
Example
仕事は一生懸命するものだ。
Work is something you should put all your effort into.
How to tell them apart
Don't use it to elders or superiors.
「~ことだ」 is a fix for a specific problem in front of you: 「風邪なら寝ることだ」 (If it's a cold, go to sleep).
「~べきだ」 is about social duty and principle: 「ルールは守るべきだ」.
「~ものだ」 is about how things naturally are: 「親は大切にするものだ」 (One should cherish one's parents).
「ことだ」 can't be used for general common sense.