The Present Perfect (has/have+ past participle) is used for an action that has been completed in the recent past or for an action whose time is not definite.
He has just gone out.
The boys have completed the course recently.
I have visited Paris.
Hari has read the instructions.
A common error that we commit is to use the present perfect with a specific time. Expression such as yesterday, last week, last year, in the morning and so on.
“We have visited the temple yesterday ” is grammatically incorrect.
“I have bought this car last month ” is ungrammatical.
The Simple Past is used for an action completed in the past at a definite time. We could correct these sentences by using the Simple Past Tense as they contain the time expressions yesterday and last.
We visited the temple yesterday .