Present perfect or past simple — reference
The present perfect is a present tense and the past simple is a past tense.
If we are talking about some period of time that started and ended in the past (yesterday, last week, two years ago, last summer), we use the past simple (did, went, said, worked etc.).
If the result of the action has to do with the present moment and there is no indication of the finished time period, we use the present perfect (have done, have gone, have been etc.)
This table of the words-indicators will help you choose between the present perfect or the past simple:
last (last Sunday, last month, last year…)
ago (five days ago, a week ago)
when (when I was a child)
in + year
on + date
(in 1988, in June, on Monday, on April 26)