Rotation eulerangles not adjusting correctly...

I am trying to make a simple flappy bird clone (in order to act as a sort of practise / first game, NOTE: This is not my first game). I am trying to imitate the rotation that occurs whenever you “fly” (as in pointing up, then gradually point downwards). I have tried using smoothdamp and lerp but neither are working… The outcome of what the code is outputting, is that the bird just keeps rotation (z axis) with no stop.

using UnityEngine;
using UnityEngine.UI;
using System.Collections;
	
public class Fly : MonoBehaviour 
{	
public float flyVelocity;
Rigidbody2D rb;
bool canFly;
Vector3 currentRotation;
	public Vector3 targetRotation;
	float rotationSpeed = 180f;
	float smoothTime = 0.3f;
	//Vector3 rotationVel = new Vector3 (0, flyVelocity, 0);

void Update()
	{
		currentRotation = transform.eulerAngles;
		currentRotation.z -= 10f;
		
		if(transform.eulerAngles.z <=-40)
		{
			currentRotation.z = -40;
		}
		transform.eulerAngles = currentRotation;
		
		if(Input.GetButtonDown("Jump") && canFly)
		{
			currentRotation = new Vector3(
			0,
			0,
			Mathf.LerpAngle(currentRotation.z, targetRotation.z, Time.deltaTime));
			
			transform.eulerAngles = currentRotation;
			rb.velocity = new Vector2(rb.velocity.x, flyVelocity);
			
		}
}
}

Try this method instead.

    public float jumpforce = 100;
    public Rigidbody2D mainRigidbody;
    public bool grounded;

    private float tempAngle;

    private void Start()
    {
        mainRigidbody = GetComponent<Rigidbody2D>();
    }

    private void Update()
    {
        RaycastHit2D hit = Physics2D.Raycast(new Vector2(transform.position.x,transform.position.y-0.42f), -Vector2.up);
        //Change 0.46f to half of the 2d collide height.
        grounded = hit.distance <= 0.46f ? true : false;
  
        Debug.Log(hit.distance);
        if (Input.GetKeyDown(KeyCode.Space) && grounded)
        {
            mainRigidbody.AddForce(Vector3.up * jumpforce);
        }

        if (mainRigidbody.velocity.y < 0)
        {
            tempAngle = -hit.distance * (jumpforce / 45);
        }
        else
        {
            tempAngle = 0;
        }

        transform.eulerAngles = new Vector3(0,0,Mathf.LerpAngle(transform.eulerAngles.z,tempAngle,Time.deltaTime*6));
    }

My suggestion would be something like this for rotation since rotation is related velocity in y diretion:

    Quaternion upRotation;
    Quaternion downRotation;
	void Start () {
        float upAngle = -40.0f; //modify this angle
        float downAngle = 40.0f; //modify this angle
        upRotation = Quaternion.EulerAngles( new Vector3(0,0,upAngle));
        downRotation = Quaternion.EulerAngles( new Vector3(0,0,downAngle));
	}
	
	// Update is called once per frame
 void Update()
  {
     if(rb.velocity.y < .0f) // when falling
     {
         transform.rotation = Quaternion.Lerp(transform.rotation,downRotation, Time.deltaTime * 5.0f);
     }
     else
     {
         transform.rotation = Quaternion.Lerp(transform.rotation,upRotation, Time.deltaTime * 5.0f);
     }
}