Y rotation lock

i dont know how to lock y rotation. I also dont have constraints in my rigidbody component

Is this for 2D or 3D? For 3D, the Rigidbody component has check boxes to freeze rotation on each axis under the Constraints section of the inspector.

image