LookAt rotate around X

I know this has been asked and answered a million times , mostly relating to y rotation for turrets etc.
but…

I am trying to make a Cube (1) Rotate around its X Axis only.
To look at another Cube object (creating a Flap ).
Local Z is facing forward correctly ,Y is Up.
Using below simple code, Cube (1) snaps to look at World Z

 targetPostition = new Vector3 ( transform.position.x, target.position.y, target.position.z );
            transform.LookAt(targetPostition);

If I set it to :

 ... new Vector3 ( target.position.x, **transform.position.y**, target.position.z );

Cube(1) stays facing forward in local position and rotates perfectly around Y only, but I need to rotate around X.

I have been through tons of answers here and elsewhere ,
have also tried using Quaternion.LookRotation , but again with .x restricted to transform.position . Cube(1) looks towards World Z only.

Im well and truly stuck here, any suggestions greatly appreciated

private void Update()
{
targetPosition = transform.position + (Vector3.ProjectOnPlane(Target.position - transform.position, transform.right));
transform.LookAt(targetPosition);
}

This will keep the rotation of the object on its Y and Z intact while rotating the object along its X axis.

NOTE: * targetPosition * apologies for my mis spelling !

Thank you very much for replying
This only seems to work if the target cube is moved into a position so that Cube(1) is again looking in World Z direction.

ProjectOnPlane () has fried my brain , especially after spending all day frustrated with what i though would be a simple process.

i just want to rotate the long cube like a wing flap around x only ( will be making target a grabbable object in XR Interaction.

If there is a more suitable solution please let me know .

Thanks everyone ))

Fantastic.
That works perfectly.
I hate to just paste stuff in without knowing how it works , but now i can get over this hurdle and onto the next one.
Thank you ever so much for your help