How to play a particle system?

I have a particle system that i want to play on input. I have made the input part of the code but how do i start this particle system, what script should i use?

My code:

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

public class Attack : MonoBehaviour
{
    [SerializeField]
    KeyCode attackKey;
    private void FixedUpdate()
    {
        if (Input.GetKey(attackKey))
        {
            
        }
    }
}

The Attack script is attached to the particle or a different GameObject?
If it’s not attached to the particle GameObject itself you’d have to pass a reference of the ParticleSystem via inspector or find the GameObject via scipt and get the ParticleSystem component.
Once you have a reference of the ParticleSystem just use the Play method.

Example Attack Script not attached:

ParticleSystem ps = GameObject.Find("ParticaleSystem-Object-Name").GetComponent<ParticleSystem>();
ps.Play();

Example Attack Script attached:

ParticleSystem ps = GetComponent<ParticleSystem>();
ps.Play();

Reference your ParticleSystem and use .Play() on it. Like: ps.Play()