Idempotency is the ability for an operation to be carried out multiple times without changing the state of the system.
With this definition we can say regularly used methods like the PUT and GET are idempotent since regardless of what is sent in the request or how many times you make the request the outcome remains the same. Lets take the GET method as an example
No matter how many times the endpoint is called, it will always result in the same outcome, the system remains unchanged.
Now lets answer the question why is the DELETE method idempotent? Deleting the item from the first call removes the item from the system and subsequent request will return a 404 since the resource has been deleted.
The key here is to understand that idempotency doesn't mean the response will always be the same, it means that the state of the system will remain unchanged. Lets use this delete request as an example
Since the data with id of 1 has been deleted on the first request, making this request multiple times won't change anything on the system meaning it would always result to the thing, the data with an id of 1 no longer exists.
Extra: The PUT also does the same since making the same call with the same request body would result to the same data being overwritten. Hence nothing changed.