I think the simplest approach is to recognise that you wish to look up a column vector from a two-dimensional array. Match will pick out the code you seek from the heading row and INDEX can return the entire column of card numbers
= INDEX( CardNumbers, , MATCH( Code, CardCodes, 0 ) )
If you wished, individual card numbers could be returned by including an array of row numbers so
= INDEX( CardNumbers, {1,2,3,4}, MATCH( Code, CardCodes, 0 ) )
would return a row of 4 values.
In each case Ctrl+Shift+Enter would be needed to commit the formula.