Try to find a video demonstrating; it’s quite hard to convey the appropriate amount of vigor with text.
Also adults should never take out their own frustration/anger on a baby. That’s not what we are talking about here.
It’s not that easy to accidentally shake a baby too hard. Babies are quite robust, and new parents (that I have seen anyway) are almost all extremely cautious. But make sure the baby is fully supported; you don’t want their head flopping around.
Go watch the nurses/midwives/doctors in a maternity ward sometime and you will see them manhandling newborns in ways that make new parents nearby feel pretty anxious... but the babies are just fine.
https://www.youtube.com/watch?v=sB2Fw3MFlhk (The original Happiest Baby video has a bunch more examples with live crying babies and makes it a bit clearer. I don’t know if those are online anywhere though.)
When my Daughter was born I was the one who dealt with her at night time for 4 weeks after our confinement nanny left. To get her to sleep I would swaddle her, hold her on her side in my arms and rock her gently while saying “shushhhhhhhhh in her ear till she calmed down” she would fall asleep in about 2 minutes. Then I would place her in the cot slowly and pat her bum for 5 minutes. Then she would sleep for 3-4 hours till next feed.
I had never heard of the 5 S’s but the similar things I did they do work.