That's right.
Wagner is a free agent right now but if the Rams "Designate" his release as a post-June 1 move, they would have more cap space in 2023 but less in 2024 because they would be pushing-off some of the dead-$ until next year.
However, the math does not apply until post-June 1. So there is no current impact on the current Rams' cap.
The $7M-$8M of cap space they currently appear to have may be enough for the up-coming draft class, so if they decide to hold-off on any free agent signings, that amount may be enough. Not an exciting possibility. There are also always other moves (restructures) to create immediate cap space.