how bullet pointing towards the target unity

public transform targets;

indnum = Random.Range(0, targets.Length);

            bullet = Instantiate(bulletpref, firepoint.position, firepoint.rotation);
        
            Rigidbody2D rb = bullet.GetComponent<Rigidbody2D>();
             rb.velocity = (targets[indnum].position - firepoint.position).normalized * bulletforce;

the code i use to fire its works perfect but the bullet is not pointing towards the target rather it go like parallel to it

You need to set Transform.Rotation of the bullet so it looks towards the target. The easiest way to do that is during initiation:

Vector3 dir = (targets[indnum].position - firepoint.position).normalized;

bullet = Instantiate(bulletpref, firepoint.position, Quaternion.LookRotation(dir));

Rigidbody2D rb = bullet.GetComponent<Rigidbody2D>();    
rb.velocity = dir * bulletforce;