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.