Secondary sources are also sometimes called "indirect citations."
As per the Publication manual of the American Psychological Association (2020):
(Rabbitt, 1982, as cited in Lyon et al., 2014)
Only Lyon et al.'s work appears in the reference list.
An example of a secondary source citation can be found below and another example is on p.5 of the Sample Annotated Student Paper from APA. In the annotated student paper example the year of the primary source is known so it is included. If the year of the primary publication is known, include it in-text; if the year of the primary sources is not known, it can be omitted from the in-text citation.
In Text examples
In Warkinton’s study (as cited in Roberts, 2020), children’s cognitive growth and development …
Or
Roberts (2020) examined Warkinton’s study on children’s cognitive growth and development……
Reference List examples
Roberts, M. (2020). Children and cognition and the development of language. Psychological Reports, 19(7), 412-419.
Note: You only include resources you accessed/read in your References list - you read the Roberts article (which referenced the Warkington article) so the Roberts article is included in your list of References (not the Warkington article).