I think there may a little OVER-analysis here with regards to Miller's contract numbers.
It really comes-down to how its structured; and the most important factors are guaranteed-$ (which we know), AND how the contract is structured for the 2022 salary-cap-hit (which we do not know).
Two contracts for the exact same number of years, total amount and guaranteed amount can be structured differently to result in completely different cap-hits from year-to-year.
For example, some have stated (including media) that it's essentially three years and $51-53M. OK but that's NOT enough information to tell anyone what the 2022 cap hit for the Bills. Simple math results in $17.5M-per-year. OK, but that's not necessarily how the contract is structured; and I would doubt the Rams are in a position to allocate $17.5M to their 2022 salary cap.
One example for comparison is Noteboom's deal, which is on Spotrac. I will assume it's accurate for illustration. Noteboom signed a three-year / $40M contract. Simple math ... 40 divided by 3 = $13.33M per-year.
Noteboom's 2022 cap hit is NOT $13.33M.
It's a mere $3.5M! Structure and voidable years allow for a low # in 2022.