When we talk about things in the past that are not true any more, we can do it in different ways.
We can use used to to talk about past states that are not true any more.
We used to live in New York when I was a kid.
There didn't use to be a supermarket there. When did it open?
Did you use to have a garden?
We can also use used to to talk about past habits (repeated past actions) that don't happen any more.
I used to go swimming every Thursday when I was at school.
She used to smoke but she gave up a few years ago.
used to + infinitive should not be confused with be/get used to + -ing, which has a different meaning. The difference is covered here.
We can use would to talk about repeated past actions that don't happen any more.
Every Saturday I would go on a long bike ride.
My dad would read me amazing stories every night at bedtime.
would for past habits is slightly more formal than used to. It is often used in stories. We don't normally use the negative or question form of would for past habits. Note that we can't usually use would to talk about past states.
We can always use the past simple as an alternative to used to or would to talk about past states or habits. The main difference is that the past simple doesn't emphasise the repeated or continuous nature of the action or situation. Also, the past simple doesn't make it so clear that the thing is no longer true.
We went to the same beach every summer.
We used to go to the same beach every summer.
We would go to the same beach every summer.
If something happened only once, we must use the past simple.
I went to Egypt in 2014.