Shoot a bullet in a 2d game

Hello everyone, here is my problem:

I would like that when I press the A key
from the keyboard, a bullet is fired by the gun but the bullet does not fire, it just stays to the right and does not advance to the end of the map

The bullet code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ShootBullet : MonoBehaviour
{

    public GameObject originalBullet;


    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        if(Input.GetKeyDown("a"))
        {
            var bullet = Instantiate(originalBullet, transform.position, transform.rotation) as GameObject;

            bullet.transform.Translate(Vector2.right * 20f * Time.deltaTime);

            
            
        }
    }
}

Thank you for your help !

You are only moving the bullet once when you press “a” because transform.Translate only happens once as “a” is also only pressed once. You could set the velocity of the bullet instead of transform.Translate. Or you could put the transform.Translate into an update on a new script and attach that script to the bullet.

Thank you, it’s worked !!