laserbeam on a 90 degree angle

Hi, Im new to Unity and scripting. My problem is my spaceship which shoots the laser

beam with an 90 degree angle.
This is the code.

            GameObject newBullet = Instantiate(bullet, transform.position, transform.rotation);
             newBullet.GetComponent<Rigidbody2D>().AddRelativeForce(Vector2.up * bulletForce);
             Destroy(newBullet, 2.0f);
             currentAmmoState--; 

There is no cote on the laser beam itself.
Best Regards.

Basically what @Miaw666 said was correct. The “bullet” you instantiate is just not oriented correctly.

simply rotate it by 90 degrees by using newBullet.transform.Rotate(90f, 0f,0f); The angle might need a - and/or you might have to set the “90” in a different axis of the rotation function as i don’t know which axis you have to rotate about. That detail is missing in the post.
Be aware here that this will also change the Vector you have to use for the force you apply so the Vector2.up will probably have to be something like Vector2.forward.

Just an addition to @Captain_Pineapple 's answer, if your game is 2D, you need to rotate it by 90 degrees on the z-axis, and in that case, Vector2.up will work fine.
Another way to rotate this is by changing the 1st line to

GameObject newBullet = Instantiate(bullet, transform.position, transform.rotation * Quaternion.Eular(0,0,90));  // to rotate it 90 degree more from the initial rotation