This is called secondary referencing. For MHRA, first we recommend that you try to locate and read the primary source – this will make it much easier to reference and will ensure you are not taking the quote/paraphrase out of context.
Situation A: you can’t find the primary source
You only reference the secondary source in your final bibliography. You then refer to the primary source in your footnote, for example (see footnote below):
The study by the University of Warwick, cited in Bryson and MacKerron2, found a clear correlation between the productivity of employees and their happiness.
2 Andrew J. Oswald, Eugenio Proto, and Daniel Sgroi, quoted in Alex Bryson and George MacKerron, ‘Are you happy while you work?’, The Economic Journal, 127 (2015), 106-125 (p. 124) [accessed 4 August 2021].
Situation B: you can find and use both primary and secondary source
You reference both the primary and secondary sources in your reference list and cite them independently as you would any other reference.