What size (and the greater/less then symbol) means depends on what type of number it is and what you are doing with that number. Indeed it is in some ways fundermental to what we consider numbers to be.
When we are using numbers to count how many elements there are in a collection (for example how many sheep are in a field or characters are in a tweet) this is called “Cardinality”. The numbers we use for finite cardinality are the natural or counting numbers $0, 1, 2 ... $.
When thinking in terms of cardinality, The mathmatical definition of smaller is “A is smaller or equal to B if every element within A can be paired with an element from B without re using any element from B”. For example if you had two classrooms full of students and you told every student from the first classroom to hold hands with someone from the second classroom this could only happen if the first classroom had an equal or smaller amount of students.
However this isn’t the only way we use numbers we also use $\lt$ And $\gt$ to express the idea of “before” and “after”. When we are talking about numbers in the sense of order we talk about ordinals. For the natural numbers this is the same thing but for other systems of numbers it is not.
For the integers (the natural numbers and the negative numbers), rational numbers (integers and fractions) and real numbers (rational numbers and all the numbers that are between the rational numbers) greater then and less then is defined in terms of “In which order are these two numbers on the number line”.