In writing a paragraph, how can we use "had been" sometimes, but on other occasions we can use "was" rather than "had been"? So, how do I decide which to use?
Had been is usually used in passive voice sentences.
If you say
The work had been completed by January 2019.
The work was completed on 21st January 2019.
There is a difference between these two sentences. Had been is used for the period of time when the exact timing is not known. If you use was it refers to the exact moment.
Here are some examples
This was the way of life back then.
This had been the way of life.
There is the difference between the sentences, and it is not just at the was or the had been. The was has back then and the had been does not need that.