Controlling the non-Markovian dynamics of open quantum systems is essential in quantum information technology since it plays a crucial role in preserving quantum memory. Albeit in many realistic scenarios the quantum system can simultaneously interact with composite environments, this condition remains little understood, particularly regarding the effect of the coupling between environmental parts. We analyze the non-Markovian behavior of a qubit interacting at the same time with two coupled single-mode cavities which in turn dissipate into memoryless or memory-keeping reservoirs. We show that increasing the control parameter, that is the two-mode coupling, allows for triggering and enhancing a non-Markovian dynamics for the qubit starting from a Markovian one in absence of coupling. Surprisingly, if the qubit dynamics is non-Markovian for zero control parameter, increasing the latter enables multiple transitions from non-Markovian to Markovian regimes. These results hold independently on the nature of the reservoirs. This work highlights that suitably engineering the coupling between parts of a compound environment can efficiently harness the quantum memory, stored in a qubit, based on non-Markovianity.