How to get mouse position to shoot

I am working on a 2d Game. In my game, ai (doesn’t move) shoots the player. how to get the position to shoot in the player direction

My code doesn’t work accurately

Enemy

void Fire()
{
Instantiate(sawGameObject, transform.position, Quaternion.identity);
}

Bullet

void Awake()
{
target = GameObject.FindGameObjectWithTag(“Player”);

    player = FindObjectOfType<PlayerControler>();

    direction = (target.transform.position - transform.position).normalized;
}

void Update()
{     
    Vector3 temp = transform.position;

    temp += direction * speed;
    
    transform.Translate(temp * Time.deltaTime);

    Destroy(gameObject, 0.6f);  
}

HELP PLEASE

I understood, what you mean.
First remove Destroy from Update, put it in Awake() or better in Start()
Second don’t use temp, replace Update() with

     void Update()
     {    
       transform.Translate(direction * speed * Time.deltaTime)
     }