Referencing something referenced in an another author's work is called secondary referencing. If you want to reference a secondary reference, you do only in the text of your work, not in the reference list. You don't mention the secondary reference in the reference list because the reference list is the list of sources you used for your work. Did you use the secondary reference? No, you didn't, so you don't mention there. In the text of your work, you;'d say something like:
Kelly (2021, cited in Murphy 2022) said something interesting
or
Something interesting (Kelly 2021, cited in Murphy 2022).
You only include Murphy 2022 in your reference because that is the source that you looked at.