A detailed discussion of the early history of set theory is in :

The starting point are Dedekind and Cantor.

Dedekind, in his exposition of the theory of fields (1871) writes [§159] :

By a *field* [*Körper*] we mean an infinite system [*System*] of real or complex numbers [...].

In a draft for *Zahlen*, written between 1872 and 1878, he introduces the concepts of system and of mapping ["Die Begriffe des Systems, der Abbildung"].

In Was sind und was sollen die Zahlen? (1888) we find also : "zusammengesetze System" and "Gemeinheit der Systeme" ["compounded system" (union - Def.8), and "community of systems" (intersection - Def.17)].

Cantor in the years 1863-64 introduced his theory od *point-sets*, and in 1872 speaks of *set of points* [*Punktmenge*].

Up to now, we have "sets of" something : numbers or points.

The "pure" notion of *set* has been introduced by Cantor in 1879 :

I say that a *manifold* (a collection, a *set*) of elements that belong to any conceptual sphere is *well-defined* ["Eine *Mannichfaltigkeit* (ein Inbegriff, eine *Menge*) von Elementen, die irgend welcher Begriffsphare angehoren"]

followed in 1883 by the "mature" concept :

By a *manifold* or a *set* I understand in general every Many that can be thought of as One, i.e., every collection of determinate elements which can be bound up into a whole through a law, and with this I believe to define something that is akin to the Platonic εἶδος or ἰδέα. ["Unter einer *Mannichfaltigkeit* oder *Menge* ...].

We can find *class* into the *claculus of class* of The Algebra of Logic Tradition : from Boole to Schröder.

Peano in Arithmetices principia (1889, page x) uses *classis*, followed by Russell (*Principles*, 1903). Of course, also Frege did [Appendix to vol.2 of *Grundgesetze*, discussing Russell's paradox, also if *class* is a "derived" notion for Frege, "concept" [*Begriffe*] being the primitive one] :

I cannot see how arithmetic could be given a scientific foundation, how numbers could be
conceived as logical objects and introduced, if it is not allowed - at least conditionally - to go from a concept over to its *extension*. Can I always speak of the extension of a concept, of a *class*?

Zermelo (1908) starts from Cantor's definition of set (1895) as "a collection, gathered into a whole, of certain well-distinguished objects of our perception or our thought" [Unter einer 'Menge' verstehen wir jede Zusammenfassung ...]

He introduce also the notion of "Klassenaussage" ('class-statement') meaning a logical expression with one variable, what Russell called a *propositional function*.

Finally, von Neumann (1925) speaks of : *set* [*Menge*] and *class* [*Bereich*] :

"sets" are the sets that (in the earlier terminology) are "not too big", and "classes" are all totalities [*Gesamtheiten*] irrespective of their "size".

See also The Early Development of Set Theory.