The official website for The Settlers of Catan

Question about Base Game Resource Cards - In what order are the Resource Cards distributed if there are not enough cards of a certain type to supply all players?

Answer

If it isn't sure whether there will be enough cards of a certain type for all players, first determine the total number of available cards of this type. If the number of cards of this type is indeed insufficient, then none of the players receives this resource on this turn.

Please consider also this question: