Easy:
Imagine 24 numbered balls in a barrel like they use to pick winners in lotteries (at least here in the US).
Your question amounts to asking how many different ways can a drawing of three balls be done.
The answer is there are 24 possiblities for the first ball drawn. Now there are just 23 balls left in the barrel. So there are 23 possible ways to draw the second ball, leaving 22 ways to draw the third ball.
The total number of possibilities is 24 * 23 * 22 = 12,144. The math term for this is “permutations” as in “There are 12144 permutations of three items selected from 24.”
The same logic applies any time you are drawing from a set of unique items. e.g. if you wanted to draw 4 balls from 24, the answer is 24 * 23 * 22 * 21. Drawing 2 cards from a pack of 52 is 52 * 51, etc.
In your question, order DOES matter. You say drawing 1-2-3 is different from drawing 3-2-1. The method described above solves that problem.
But what if order does NOT matter. i.e. 1-2-3 and 3-2-1 are considered the same result, but both are different from 1-2-4 or 4-2-1 which are also considered the same.
Clearly there are fewer possible answers here since lots of answers will now be considered duplicates of each other. But how many fewer?
This sub-question depends only on the number of balls picked, in your example 3. Whether you picked those three from 24 or from 240 doesn’t matter.
Given 3 balls with some number on them, how many ways can you sort them? The answer is 3 * 2 * 1 = 6. For 4 balls the answer is 4 * 3 * 2 * 1 = 24, etc.
That number (e.g. 6) is the number of duplicates in each group of duplicates. So if we take the total possibilities and divide by the number of items in a duplicate group, the result is the number of groups. In other words, the number of distinct possibilities ignoring the seqeunce.
So if order does NOT matter then we take our original answer and divide by 3 * 2 * 1 = 6 and the result is 12144 / 6 = 2024.
The math term for this is “combinations” as in “There are 2024 combinations of three items selected from 24.”
Math folks have fancy symbols and shorthand notation for these ideas, but it sounds like you don’t need that.
Cheers.