Both the present perfect and past simple refer to past action. However, they have different functions:
The past simple is typically used to refer to an action that was completed at a definite time in the past (e.g., “I slept in this morning”).
The present perfect is used to refer to a past action that has present consequences or to an action that began in the past and may continue (e.g., “I have written a book”).