Transform the rotation of one object with the position of another

I have a complex turret with moving pistons and joints all hooked up with constraints and now I am trying to move the turret by moving an aim point. The aim can make the system look up and down with out any issues but do to the tilted base of the system I am finding it hard to rotate side to side.

Here is the code I am trying with a note on where I know I am going wrong and need the most help.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class TurretAimRotation : MonoBehaviour
{

    public GameObject target;

    private float aim;
    private float startAim = 1.1528f; //Because my item is not zeroed out.

    // Start is called before the first frame update
    void Start()
    {
        aim = target.transform.position.x;
    }

    private void Update()
    {

        // each time the aim value goes up call left and each time it goes down call right
        if (aim == aim++) //←clearly this is wrong and where I need help
        {
            left();
        }

        if (aim == aim--)//←clearly this is also wrong and where I need help
        {
            right();
        }

        //stop right and left when aim is not moving on the x axis
    }

    void left()
    {
        this.transform.RotateAround(transform.position, transform.up, Time.deltaTime * 90f);
    }

    void right()
    {
        this.transform.RotateAround(transform.position, transform.up, Time.deltaTime * -90f);
    }
}

Any help world be appreciated.

Use Rotate.Towards and Lerp to make it smooth. Unity - Scripting API: Vector3.RotateTowards