You have an article written by Smith, published in 2020. In it, Smith has quoted a book written by Jones in 2018. You want to include Jones' quote in your paper.
Whenever possible, try to find the primary source (Jones' book) instead of citing the secondary source (Smith's article). However, if you do not have access to Jones' book, you can still use the quote.
Put the source you have on hand, by Smith, in the reference list. Use your in-text citation to explain the quote was cited in Smith's article.
Example:
Jones says, in her book Zombie Heaven, that "The zombies considered the elderly 'meals on wheels!'" (as cited in Smith, 2020, p. 82).
Zombies used the term "meals on wheels" to describe the elderly (Jones, 2018, as cited in Smith, 2020, p. 82).