In general, for "number-based" sections (year section, 2468, 13579 and 369), you have to use the numbers stated on the card. For Consecutive Runs and Any Like Numbers, you can use any number that follows the pattern on the card (eg: consecutive run line 2 shows numbers 1-4 on the card, but you could do 3-6 or 5-8 or whatever run).
What complicates things is that there are exceptions, and you have to carefully read the note in parenthesis. For example, even though, in general, you can use any sequence for the consecutive run section, line 1 says "these numbers only", so, for this hand, you have to stick with the numbers printed on the card.
For sections like Quints, Singles/Pairs and Winds/Dragons, the note is crucial. If you see "any like", it means you can use any number (as long as they're all the same), for example S/P line 1. And when you see "any x consec. Nos", you can use any number in the specified sequence (eg: S/P line 3 or Quints line 2).
Finally, you'll sometimes see more specific notes that restrict the numbers that can be played. For instance, in S/P line 4, your last 2 pairs can be any EVEN numbers (though, of course, they all need to be the same number). Same goes for Winds/Dragons line 2, but this one is a bit tricky because there are 2 versions of the hand: for the north/south version you can use any like ODD numbers, and for the East/West version you can use any like EVEN numbers (the note is a bit confusing but I guess they did not have enough space to spell it out).
A good way to learn and practice this is to use our Make-a-Hand exercise (in the Exercise Room, below the game launchpad). This exercise will challenge you to put hands together and validate they are correct. For more information on exercises, click here.
* above examples relate to the 2021 National Mah Jongg League card