Projectile spawning top right of screen rather than middle

So I’m aiming to have a marshmallow shoot out a projectile on click, and currently my target is to make it spawn on click. Though it spawns at the top right which I cannot seem to fix. Any help greatly appreciated!

The error =

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SpawnProjectile : MonoBehaviour
{

    public GameObject firePoint;
    public List<GameObject> vfx = new List<GameObject>();

    private GameObject effectToSpawn;
 
    void Start()
    {
        effectToSpawn = vfx[0];
    }

  
    void Update()
    {
        if(Input.GetMouseButton(0))
        {
            SpawnVFX();
        }
    }

    void SpawnVFX()
    {
        GameObject vfx;

        if(firePoint != null)
        {
            vfx = Instantiate(effectToSpawn, firePoint.transform.position, Quaternion.identity);
        }
        else
        {
            Debug.Log("No Fire Point");
        }
    }
}

What is firePoint? Is this the spawn location?

This should get you started, either transform.position it to vfx or firePoint.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SpawnProjectile : MonoBehaviour
{
    public GameObject firePoint;
    public List<GameObject> vfx = new List<GameObject>();
    private GameObject effectToSpawn;
    void Start()
    {
        effectToSpawn = vfx[0];
    }
    void Update()
    {
        if(Input.GetMouseButton(0))
        {
            SpawnVFX();
        }
    }
    void SpawnVFX()
    {
        GameObject vfx;
        if(firePoint != null)
        {
            vfx = Instantiate(effectToSpawn, firePoint.transform.position, Quaternion.identity);
            vfx.transform.position = this.transform.position;
        }
        else
        {
            Debug.Log("No Fire Point");
        }
    }
}

FirePoint is where the projectile should spawn.

Where is the pivot on the object that the script is assigned to? (select it and press Z).

https://prnt.sc/qsjj6c

Sorry if I don’t understand some stuff, am a beginner.

Why did you add the code at line 26?
This will change the position of the VFX to the position of the game object that the scripts sit on.
I think you can remove that line.

It changes the position of the the spawn blob in relation to VFX or firePoint., it’s not parented to it (see image).

The centre of firePoint might be off, it seems to be generating top right constantly.