Why My Animation Shaky

Hello Developers!
Here, take a look at the video first.
Link

As you can see, when I move forward or backwards, there’s no shaky animation, but when I move to the sides, walla there you go the weird shaky comes out. How can I change it to make it move smoother?
What I currently did was, I used transform modifier bone [spine 1-3]. I tried to search for the solution on youtube, but none help me out.
I want to know exactly how professionals, used custom animations and skeleton to make the animation smooth even after using the modifier bones on AnimBP.