How would i pull off weapon sway similar to this

i’ve tried replicating this type of weapon sway utilizing mouseDelta and Vector2 but to no avail. i’m heavily unsure on what to do in order to achieve something like this.