[2D] bullets fired do not go in the direction of the pointer

I am making a 2D game in which the arm of the player points toward the pointer. but the projectiles move in only x axis, instead of the direction of the arm.
this is the code for the gun (child of arm)
using UnityEngine;

public class Gun : MonoBehaviour 
{
    public Transform FirePoint;
    public GameObject Bullet;
    private void Update() 
    {
        if(Input.GetKeyDown(KeyCode.Space))
        {
            Instantiate(Bullet, new Vector3(FirePoint.position.x, FirePoint.position.y, 0), Quaternion.identity);
        }
    }
}

and this is the code on the bullet prefab(i know its bad; i’m new):

using UnityEngine;

public class Bullet : MonoBehaviour 
{
    public float speed = 30f;
    public GameObject BulletSelf;
    public Rigidbody2D rb;

    private void Start() 
    {
        rb.velocity = new Vector2(speed, 0f);
    }
    private void OnCollisionEnter2D(Collision2D other) 
    {
        Destroy(BulletSelf);
    }
}

I am using brackeys’ tutorial for the rotation of the arm.
i can provide further info if needed.

@dev_icyfirejosh4352
You need a reference to the transform of the FirePoint in your bullet object. (Or you could reference it many other ways) Then you need to shoot the bullet at the direction of the FirePoint transforms forward direction.

using UnityEngine;
 
 public class Bullet : MonoBehaviour 
 {
     public Transform FirePoint;
     public float speed = 30f;
     public GameObject BulletSelf;
     public Rigidbody2D rb;
 
     private void Start() 
     {
         rb.velocity = new Vector2(FirePoint.right * speed);
     }
     private void OnCollisionEnter2D(Collision2D other) 
     {
         Destroy(BulletSelf);
     }
 }