Stopping rotation of rigidbody

I want to stop rigidbody’s rotation at a specific time (instantly) in 3d. How do I do that?

rigidbody.angularVelocity = Vector3.zero;

You can try using freeze rotation, as shown here:

You may need to set the angular velocity to zero before doing it to just be sure it doesn’t continue after, but should be fine.

rigidbody.freezeRotation = true;
rigidbody.angularVelocity = Vector3.zero;
rigidbody.freezeRotation = false;