How to shoot a bullet to the mouse cursor position?

I’m currently making a 3d top-down shooter and I want the player to shoot bullets to the position of a mouse click, but right now no matter where I click, the bullets always go on top direction.
Here is my shooting bullet script so far:
public class shooting : MonoBehaviour
public GameObject projectile;
public float shootingForce;
public AudioClip shootingSound;
private AudioSource shootingAudio;

// Start is called before the first frame update
void Start()
    shootingAudio = GetComponent<AudioSource>();

// Update is called once per frame
void Update()
    if (Input.GetKeyDown(KeyCode.Mouse0))
        // GameObject shot = GameObject.Instantiate(projectile, transform.position, transform.rotation);
        // shot.GetComponent<Rigidbody>().AddForce(transform.forward * shootingForce);
        GameObject shot = GameObject.Instantiate(projectile, transform.position, transform.rotation);
        Vector3 screenPoint = Camera.main.ScreenToWorldPoint(transform.position);
        Vector3 direction = (Input.mousePosition - screenPoint);
        shot.GetComponent<Rigidbody>().AddForce(direction*shootingForce, ForceMode.Impulse);

        shootingAudio.PlayOneShot(shootingSound, 1.0f);

Does anybody knows how to fix this?

You mean the bullet goes up? ‘the bullets always go on top direction’ Didn’t get this part. What you should be doing is using Raycast if you want the bullet to hit what you’re pointing at specifically. First get a ray that goes out from your camera to the mouse position:

Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);

The end of that ray will be where you’re looking at.

        Vector3 dir;    
        if (Physics.Raycast(ray, out RaycastHit hit, 30f))
            dir = hit.point - player.transform.position;

That will get you the point where the player is looking at, rather than the cursor position overall.
Use that direction to apply the force at the end. Tell me if that works for you or if you have any questions