Check out example codes for "how to randomly rotate rigidbody of object in unity". It will help you in understanding the concepts better.
Code Example 1
public float speed; private Rigidbody2D rigidbody2d; void Start() { rigidbody2d = GetComponent<Rigidbody2D>(); rigidbody2d.angularVelocity = Random.value * speed; }
Learn ReactJs, React Native from akashmittal.com