(if you're too lazy to read all of the below im about to say then because it is divisible by 2,3,4 and less than 30 the number is 2 x 3 x 4 = 24)
First, we exclude 0 cause it has more than 8 factors (literally)
Since 2 and 3 are 2 of the number's factors, it must be divisible by 6.
Therefore, we have 4 options : 6,12,18,24 (30 does not count)
Since it is divisible by 4, we are left with 2 : 12 and 24.
(here's something extra which is how to identify the number of factors a number has, not necessary in this case cause we can just count, but it's useful anyways)
We do the prime factorization of that number :
For example : 120
The prime factorization of 120 is 2^3 x 3 x 5.
Now, we take the index number of every single one of the prime numbers in the factorization, add each of them by 1 and multiply them
So, the index number of 2 is 3, 3 is 1 and 5 is 1 (2^3 x 3^1 x 5^1)
-> 120 has (3+1)(1+1)(1+1) = 16 (factors).
Applying it to this case, only 24 would work, as :
24 = 3 x 2^3
So, it has (3+1)(1+1) = 8 (factors), just as it says.