Hi! About your question, we use the "present perfect" whenever the time the action takes is not relevant or not specified. Instead, we use the "simple past" whenever requested or specify data about the time or place of the action.
Examples:
Present perfect
I have lived in Lyon.
They have eaten Thai food.
Have you seen 'Othello'?.
We have been to Ireland.
Simple past
I lived in Lyon in 1989.
They ate Thai food last night.
Where did you see 'Othello'?
When did you go to Ireland?
There is also a difference in attitude, which is usually more important than the time factor. In "What did you do at school today?" we ask about the activities and we consider that the school period of that day has ended.
In "What have you done at school today?" We ask about the results (show me what you did) and we consider the moment as a continuation of the school period.
I hope this is of some use to you :)