This is a little tricky to explain so bear with me.
Imagine an upright boxing bag. These bags can be hit and will then rotate along their x and z axis, However they will naturally stand upright again after a few seconds. It doesnt matter which way they are rotated on their y axis. The bag will always come back to its starting rotation after a while.
I am trying to do something similar in code with a rigidbody, however I find myself unable to solve it. How can I constantly apply physics forces that will return my rigidbodies x and z rotations back to 0 while still allowing stronger forces to rotate it. E.g a punch or kick to the upright boxing bag.