Injeritance or prefabs?

This is about a more specific situation than the two overall. They both have their places, but there is overlap in some areas. If you’re creating a rpg and you want a bunch of enemies, does it really matter if they all share an Enemy class and just have the values changed in the prefab? Not accounting for special abilities of course, just yhings like HP and stats. Is there a big difference in making an inherited class for each enemy type?

Also, can’t pick any other topics but this one for some reason.

depends, you can use both, if the only difference between the enemies are their stats just create one class for everyone and change the stats of the prefabs, inheritance is in case you want more complex behaviour like different attacks etc that cant be achieve by just using a prefab and changing values, but as i said you can mix both