Rotation in one axe problem

when i use transform.rotate i have a problem that idont know how i can make it rotate to look at an object? iknow its abasic thing

You can get a rotation to look at an object using Quaternion.LookRotation:

    var newRotation = Quaternion.LookRotation(someOtherObject.transform.position - transform.position);
    // Basic smoothing
    transform.rotation = Quaternion.Slerp(transform.rotation, newRotation, Time.deltaTime).