Hi! We use Simple Past ("I did") for finished events, while Present Perfect ("I have done") is used for events that are still in progress or they still have an effect on the present,
I did my homework yesterday. (finished action)
I have just done my assignments. (I finished it a few seconds/minutes ago - it has an effect on the present)
Have you done the housework yet? - Yes, I did it yesterday.
Hope this helps.