Need help with spell system

Hello!
I am working on a top down 2D shooter and I want to implement some RPG elements into it, like spells. But the problem is I don’t know how to tackle this problem.
My game has 4 diffrent classes which are: mage, knight, archer and monk, these classes will all have 4 diffrent spells they can use.
Every spell will have a resource cost (mana or energy), cooldown, and time to cast it.
For example I want the mage class to have these 4 spells: blink, fireball which explodes on impact, an area of effect spell which freezes nearby enemies and a spell which simply does damage to an enemy when it touches an enemy.
But the knight class would have spells such as: swing your sword in front of you in a big radius, an area of effect spell, a charge spell where you travel forward and a buff spell where your defense stat increases.
What I’m trying to say is that all of my 4 classes will be diffrent from each other and they all will have diffrent spells, I don’t know how to implement this spell system.

I’ve already made a character class system like this:

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

[CreateAssetMenu(fileName ="ClassData", menuName ="Class Data")]
public class Class : ScriptableObject
{
    public string className;

    [Header("Class Stats")]
    public int maximumHealth;
    public int maximumResource;
    public int resourceRegenerationAmount;
    public int defense;
    public float movementSpeed;
}

Hopefully I haven’t made things hard to understand. If so please ask if anything is unclear.
Any kind of help is appreciated!

You definitely want to look at some other game examples for stuff like this because these sorts of things have a LOT of ways you can implement them.

For one, think about the “surface” of the spell system and how you would interact with it:

  • associating it with a particular class
  • selecting it from an available list
  • controlling its selectability (cooldowns, etc.)
  • variations in what it can target (friends, enemies)
  • variations in its time horizon (instant-acting vs acting over many turns)
  • variations in its strength (large fireball vs small fireball, angle of arc swing, etc.)

Etc, etc. If you at least identify a FEW of the items above and begin to try some solutions that satisfy those conditions, you will be making forward progress.

Forward progress and actual use in your game context with your design and thinking will begin to reveal how suitable your solution is, and whether it can continue exactly as is, or more likely, have some refactoring as you go.

After all, it is SOFTware… it can be changed and iterated upon!