It's not simple to explain. Short answers are often not completely accurate. Devil is in the Detail.
Short answer is that the Rams have to take previously paid bonus-$ onto their 2022 cap.
The best way to figure it out is to review contracts (once finalized ... Spotrac could be off here). Over time, it begins to make sense. I find cap management interesting and very relevant, so I try to follow it closely; and believe me, I make mistakes. So, please take what I write as my understanding and best-guess.
In this case, the $15.7M cap hit to the Rams represented Woods' $10M salary, $3.5M roster bonus (due tomorrow, I believe) PLUS pro-rated-bonus money (and maybe some other comp already paid). And that totaled $15.7M to the Rams' 2022 cap.
Tennessee is going to pay the $13.5M above. Spotrac already has it on the Titans 2022 cap.
The Rams have to take-on-to their 2022 cap ... as Dead-$ ... the pro-rated-bonus-$ (Already Paid) plus any additional bonus-$ (AGAIN, Already Paid) that would have been applied to subsequent years in Woods' contract had he remained with the Rams.
Even this is kind of a over-simplification.