Prevents anyone from wedging anything in the crack of the door. You might need a different one depending on what kind of door/lock.
To stop the shimmying from happening again, you'll need an "inswing door latch shield."
(They also make ones for outswing doors, but your description sounds like your door swings inside, which would be an inswing.)
For example: https://www.amazon.com/Defender-Security-9513-Shield-Swinging/dp/B00D2K3CAK