Assume that there are two papers A and B that give two different approaches to the same problem.
Paper A. This paper presents the method I used in my assignment.
Paper B. As reported in paper C (and some other sources): Paper B improves and combines the ideas in papers D and E. Without understanding D and E, it would be hard to understand B. Paper F shows that the method in paper B is no longer good/usable/recommended.
Reading all of papers B, D, E, F would take me a lot of time.
I did not use the method in paper B, but it is still part of the literature and has historical significance. In the background/literature review section,
- Should I omit paper B in my report (background section), or
- Should I cite paper C as a secondary source?
The norm for secondary sources varies by field, and it is generally suggested that you follow what is normal in your field.
As I note in my answer to this related question, Should I cite a paper for its literature review? - some institutions insist on secondary citations, like Columbia, while some style guides (APA) permit secondary source citation. IEEE on the other hand explicitly calls out not to use secondary sources, period.
If you were in any of the fields I work in (computer science, psychology, HCI, etc.) which use APA/IEEE styles, I would suggest a third option: cite paper B if it is important, and don't accept that you first have to read the whole chain of papers leading up to B. Saying "B is important for [reason], and shows an important historical method that is not used here", and cite it. You don't have to understand every aspect of it in detail to get the gist and determine if it should be cited or not.