How to rotate an object on their y axis?

Does anyone knows how to rotate an object on the local axis “y”?

I make an object that only moves forwards with

  rb.velocity = transform.forward * throwSpeed;

it can be rotated over the “y” axis. I can turn back if the object looks forward.

float rotationY = Input.GetAxis("Horizontal");
        

        Vector3 newRotation = transform.localEulerAngles;
        newRotation.y += rotationY * rotateSpeed;
        
        rotateSpeed;
        transform.localEulerAngles = newRotation;

When this looks up with an angle of 45° advance in that direction, but when i try to return, it turns back but is still looking up at 45° , so, the object keep going up.

I may be missing something but the way to rotate locally is simply to use transform.Rotate

I start with with a capsule facing up. I gave it a cap so I could see which way it was facing. Rotated it by (0, 180, 0) and then it was facing down. Is that what you were asking?