Angle movement with Mathf.sin

    float speed = 1.5f;
    float maxRotation = 32f;

    void Update()
    {
        transform.rotation = Quaternion.Euler(0f, 0f, maxRotation * Mathf.Sin(Time.time * speed));
    }
    float speed = 1.5f;
    float maxMove = 4f;

    void Update()
    {
        transform.position = new Vector3(0f,  maxMove * Mathf.Sin(Time.time * speed), 0f);
    }