How to rotate vector along its local y axis?

Want to set local y rotation of vector. So if my vector is (0, 0, 0). I would just set it as (0, desiredRotation, 0). But if my vector is (40, 15, 30). How would i rotate it so that the “local axis” of the vector remain the same other than “local y axis”.

Well, i think you just want to use the y of your desiredRotation, so use desiredRotation.y, making this Vector3(0, desiredRotation.y, 0).