Self-guided bullets shooting

Hi everyone. I want to create a self-guided bullets like in the example. I didn`t find info about it in the net. Help me please! Thanks in advance! Here my shooting code:

 IEnumerator Shoot()
    {
            if (canShoot)
            {
                timer = 0;
                gameManager.needToBeShaked = true;
                shootingVector = new Vector2(0, initialSpeed);
                GameObject obj = objPool.GetPooledObject("bullet" , "Bullet(Clone)");
                if (obj == null) yield return null;
                else
                {
                    if (timeShoot >= .01f)
                    {
                        float shootStuff = Random.Range(-8.0f, 8.0f);
                        canon.transform.Rotate(Vector3.forward * shootStuff);

                        obj.transform.position = canon.transform.position;
                        obj.transform.rotation = canon.transform.rotation;
                        obj.SetActive(true);
                        obj.GetComponent<Rigidbody2D>().velocity = transform.TransformDirection(-shootingVector);

                        yield return new WaitForSeconds(0f);
                        canon.transform.Rotate(Vector3.forward * -shootStuff);
                    }
                    else if (timeShoot < .01f)
                    {
                        obj.transform.position = canon.transform.position;
                        obj.transform.rotation = canon.transform.rotation;
                        obj.SetActive(true);
                        obj.GetComponent<Rigidbody2D>().velocity = transform.TransformDirection(-shootingVector);
                    }
                }
            }
        }
    }

89766-self-directed-bullets.png

This tutorial covers AI that turns and moves toward the player. Perhaps you could modify the script to send bullets toward the nearest enemy. This link will send you to the relevant portion of the video. Unity Tutorial: 2D Space Shooter - Part 5 - Shooting and AI - YouTube