Class vs Module? When is class more appropriate even if it can be done with a module?

I seem to be lacking the knowledge of how to utilize class, i tend to write everything as a module.
I expand off the existing classes, such as when I create new menus, item_apply using item.note, etc...
How do you decide if something that you are adding to the game is better implemented as a new class instead of a method? eg.. stamina system, clock, npc sensors... the sensors is likely the best example.
Currently i am using a module with two calculations with a range notetag value for "hallway" or "peripheral" sight. however, I think i will be changing that to an array system so that I can better fine tune it for changing variables such as night, sneak....
[
[0,0,0,0,0],
[0,1,50,1,0],
[0,1,20,1,0],
[0,1,10, 1,0]
]
generic, but in case my array system comment is not worded well

In any case, when do you decide that something should be written as a class vs a module??
Main Principle: Copies vs. Single Instance.
Explain it to me like I know nothing of object oriented coding... Wouldn't a function that takes an argument variable to decide the intended output.. if, elsif. be able to do the same as "copies"?
eg.. if enemy.note~los then directional los, elsif enemy.note~per then peripheral los.

Maybe I am overthinking the difference, but I am about to attempt to write my own version of an ABS system, (i give pearl the credit. I like the style they went with, but it is buggy and broken with the gameplay that I am attempting.. or maybe my style is buggy and broken lol)

Using pearl as an example.. would doing a class for item drop be more fluid... single instance seems to lag(it has to run through multiple functions on defeat and calculate what to drop.. when I chop a plant, it may take over 1 second to place the drop), the pearl also seems to forget what graphic to use on death per event even with it defined on the 3rd event page, which I haven't figured out why yet. Perhaps creating the item drop as a class would be better as a "copy"? Also, would creating the enemy.notes into a class build on startup instead of on instance? If I understand the online resources correctly, class either initializes or stores the @vaR data in the save or on startup (Please correct me on if it is saved or simply initialized on startup).

And completely off topic, couldn't I simply script my event data(eg.. enemy sensor, drop items with percentages, movement behavior, etc... It kinda seems like rpgm creates extra steps to design objects into the game that could be done externally? kinda like I don't have any common events.. I have external scripts that do what click and choose can do for that and try to keep it cleaner.
I'd use a module for helper methods like note-tag parsing, formulas, or configuration that does not need its own "memory" or does not need to be stored in savedata.

I'd use a class when I need actual instances with their own data and memory. So for something like, for example, an NPC "stealth" system, a class often makes more sense once each enemy needs its own alert state, cooldowns, last seen position, modifiers for night/sneak, etc. I would not trust a Module to store data like that, especially because they can't really be instantiated / reinitialized upon loading a new save file.

A method in a Module can calculate formulas for sight, noise, etc., but a class can store whether the enemy is aggro'd or not.

Note that RPG Maker uses comparatively few modules because most of its structure is built around game instances: Game_Actor, Game_Enemy, Game_Event, Game_Map, Game_System, etc. Those are classes because the engine needs to store that data into savefiles. That's why simple scripts can just be written using classes.

Use a module if you'll establish a more ambitious framework with a "Core Module" like scripters such as Yanfly and Victor have done.

And completely off topic, couldn't I simply script my event data(eg.. enemy sensor, drop items with percentages, movement behavior, etc... It kinda seems like rpgm creates extra steps to design objects into the game that could be done externally? kinda like I don't have any common events.. I have external scripts that do what click and choose can do for that and try to keep it cleaner.

You CAN but I feel it'd cause some headaches considering how RPG Maker handles saved event data compared to saved script data. Nothing that can't be solved with due time and attention though.
I have another good way to describe the differences. Sorry for wall of text, but I promise it's educational.

Classes
Classes, as @Chiispiitas explains, is for things of which you want to have their own data, memory, and instance but MOST importantly, initiate. If we look at Scene_Menu (which is NOT saved in the save file), you can do:
Ruby:
$scene = Scene_Menu.new
You can't do that with a module, so you'd do classes for things you want to initiate. Scene_Battle is the best example because it's the biggest class across all versions, and it's something you just cannot do in modules.

Modules
A good example of a module is one that I use in my game. One really good use for them is to hold large swabs of data that you don't want accessed all the time, even in a particular instance. For example, one of my modules is "UnitType Module." So let's say you have it in your game where all undead have 50% weakness to fire, and let's say you made 100 undead enemies. Now, if you were to decide "nah, imma make it 25%", do you want to go back to all 100 and change it? Nope! So I made this module to change/overwrite data for that instance of the enemy (so it doesn't change the data of enemies of that ID, just that specific instance of that enemy with that ID) in each instance an action is done upon them.

So, during Game_Battler, Game_Enemy, Game_Actor, and Interpreter, I call upon this module's methods in the correct locations (when calculating elemental damage) to access the Unit types of the object (enemy or actor), when I'd have to copy the code in each of those classes which goes into what @kyonides said in that, because it is a method that can be copied to each, a module allows me to essentially have them all share a method without dealing with inheritance. Now, if you're savvy, you might think "Why not insert the code in Game_Battler and call it in both Game_Enemy and Game_Actor" and the answer is I'd still have to copy the code in Interpreter, and I'd have to change Game_Battler further since Enemies and Actors have different formulas for their elemental weakesses/resistances. The method is also very long, so having it in a single spot and only 1 copy of it means, should I change the formula, I don't have to remember to change it everywhere of which it is present.

A much more simple use for them (last example, I promise) is to share variables between unrelated classes that are often very difficult to do. Modules are a clean way to transfer variables since you can call them from anywhere in any class. For example, if you are using a skill and you want to retrieve the ID of the enemy you hit because, after the battle, you want to run a script where you gain gold equal to their HP at that time (example). You can do this:
Ruby:
module gold_mod
    @hp_gold = 0
    @enemy_id = 0
    def self.enemy_hp_gold(x,id)
        @hp_gold = x
        @enemy_id = id
    end

    def self.get_hp_gold
        return [@hp_gold,@enemy_id]
    end

end

class Game_Battler

    def [whatever your damage method is]
        [enter damage calculation here]
        gold_mod.enemy_hp_gold(self.hp,self.id) if self.is_a?(Game_Enemy)
    end

end

Then, in the event, you can do a conditional branch of:
Ruby:
gold_mod.get_hp_gold[1] == 12 #(checks if the enemy was ID of 12)

Then do a script call of:
Ruby:
[gold syntax here] += gold_mod.get_hp_gold[0] #(gives you the HP they had after damage)

No cross-class-referencing needed as module does all that for you. GRANTED, you can also do this by using the in-engine variables in Game_Battler ($game_variables) then recalling it in interpreter easily through eventing but this is an easy example to show the use of the modules to share variables of unrelated classes. In this case, Interpreter (which is in charge of on-map events) and Battler. You also cannot do self.is_a?(Game_Enemy) if Game_Enemy was a module because a module cannot be an object since it cannot be initialized.

I know I said a lot, but I hope you at least got quite a bit of newfound info from that.
Thank you for all the responses and feel like I have a better grasp of the usage of each. I will practice the proper use through some "mini game" plans I have b4 I take on the ambitious project of modifying pearl abs for my application.. I know crops should be a class, and the farm module.

And I appreciate this community, I often give up on attempts at trying a new hobby due to the fact that older forum groups tend to troll newcomers that are asking questions that seem basic. eg. Gave up on arduino because after asking a couple questions, I realized my best resource was google.
Ya'll are awesome!!

Original thread: https://forums.rpgmakerweb.com/threads/class-vs-module-when-is-class-more-appropriate-even-if-it-can-be-done-with-a-module.182909/