problem with object rotation

for the auxiliary UI Button, I visit this line of code, how can I make the object click on the button turn 75 degrees and when he press the button again it returns to its original coordinates, that is, 0, I can’t find how to do it

if (click_detail4_1 == true)
            {
                detail4_1.localRotation = Quaternion.RotateTowards(detail4_1.localRotation, Quaternion.Euler(new Vector3(0, 75, 0)), 40f * Time.deltaTime);
     
            }
            if (click_detail4_2 == true)
            {
                detail4_2.localRotation = Quaternion.RotateTowards(detail4_2.localRotation, Quaternion.Euler(new Vector3(0, -75, 0)), 40f * Time.deltaTime);
            }

A rather simple way is to lerp one float value, which will be the axis you want to rotate around, and set the rotation with eulerAngles.

GameObject rotationObject;
float axisrotation = 0;
float targetrotation = 0;

void Update()
{
    axisrotation = Mathf.Lerp(axisrotation, targetrotation, 1.0f * Time.deltaTime);
    rotationObject.transform.eulerAngles = new Vector3(0, axisrotation, 0);
}
public void Click()
{
    if (targetrotation == 0)
    {
        targetrotation = 75;
        return;
    }
    if(targetrotation == 75)
    {
        targetrotation = 0;
    }
}