The past perfect tense is used to describe events in the past that were completed before a particular point in the past.[1]https://7esl.com/past-perfect-tense/

When to Use the Past Perfect Tense
A Finished Event Before Another Event in the Past
You can use the past perfect verb tense to describe a finished event in the past that happened before another event in the past.
For example:
- I had
left before they arrived. - They plane had
taken off before we arrived at the gate. - She had paid
the bill for the meal before I had a chance to.
An Event in the Past Before a Specific Time in the Past
You can use the past perfect verb tense to talk about an even in the past that takes place before a specific time in the past.
For example:
- Susie had
never been to Paris before this
summer. - They had
eaten dinner before 7pm. - We had never
seen the movie before last night.
Cause and Effect
You can use the past perfect tense to describe cause and effect. In this case, you must use it with the past simple verb tense.
For example:
- I didn’t turn in my homework because the dog had eaten it.
- I was late to work because there had been an accident on the road.
- She did well on the test because she had studied all weekend for it.
Emphasize the Result of a Past Event
You can use the past perfect to put emphasis on past events.
For example:
- They had
called us 5 times on the phone by the time we answered it. - I had
interviewed with the company 3 times before I got the job. - She had
taken the driving test 2 times before she passed the test.
Example Exercises
How did you do?
If some of these questions were tricky don’t worry — this is one of the topics that confuses English learners the most.
Sometimes reading alone isn’t enough. A private one on one lesson can clear up any confusion quickly and help you use this grammar naturally and confidently.

References
