Error cannot convert quaternion to vector3

I am a noob developer, and i'm trying to rotate a cube on the y axis (only 90 degrees once then i want all rotations to stop, NOT 90 degrees every second) using lerp. When i use the code that i do, I get an error saying i cannot convert an unityengine.quaternion to a unityengine.vector3. I get this error on lines 11, 16, and 17. If anyone would be able to help me, that would be amazing, and I would be immensely appreciative. Here's my code:

If you look closely when you hover over a function like Vector3.Lerp you get to see what it returns. In this case it says "Vector3 Vector3.Lerp" etc. Keep this in mind when assigning something to a variable that might not have the same container type. Same goes for transform.rotation. You can see how this is a quaternion by hovering over it as well.

Ah my bad I should've looked through your code a bit better. You assign newPos by giving it either posA or posB. These however are set as Quaternions since they are both Quaternion.Euler, which results in a Quaternion based on the value you put in between the parenthesis.

There are two ways to go about this. For now let's keep it simple and just input the posA and posB as Vector3s.

Quaternion.Euler gives you a quaternion (Unity's internal way of calculating rotations) based on the 3 Euler angle values you put into it. A Quaternion is not the same thing as a Vector 3, which is why Unity throws an error here.

But, you don't need to use a Quaternion in your example, you can just directly create a Vector3. Like this:

after changing the quaternions to vector 3's on lines 8 and 9, i still get an error on lines 3 and 21. on line 3 the error says cannot convert quaternion into a vector 3, and then on line 21 it has the same probelm. @Hirnwirbel . pls help I would be very appreciative.