As mentioned the the ものだ lesson, the combination of the 名詞（めいし） 物（もの） ‘thing’, with the 助動詞（じょどうし） (auxiliary verb) だ forms a strong determination about whatever comes before it as being ‘the way it is’. As an extension of this nuance, ものだ can be paired with verbs in the past tense, creating a phrase similar to ‘I used to (A) in the past’. However, the literal meaning is closer to ‘(A) was the way it used to be’.
I used to get yelled at by the teacher often when I was still a kid.
I used to go fishing with my father in the past.
When I was young, I used to suffer a lot.
Due to ものだ being a strong determination of something's existence/truth, this expression quite often carries the nuance that the speaker is nostalgic about (A), reminiscing about (A), or being introspective about (A). This means that it will not sound natural when describing things that are seemingly inconsequential, or have no meaningful significance.
I used to go to school everyday when I was an elementary student. (Unnatural, as this is a normal event)
In the past I fought with my father everyday. (Natural, as this is a meaningful event)
When highlighting things in the past that are not particularly important, たことがある
will be used instead.
I may have eaten this when I was a kid. (Unimportant)
When I was a kid, I played at the shrine a lot. (Potentially important, but not in this speaker’s opinion)