MATCH(search_key, range, 0) returns the position of a value in one row or column: MATCH("R-214", A2:A11, 0) is 2 because R-214 is the second code. The 0 asks for an exact match. Leave it out and MATCH assumes the list is sorted, which on an unsorted list returns a wrong position without any error.
INDEX(range, row, [column]) returns the cell at a position. Put them together and you have a lookup: =INDEX(D2:D11, MATCH(G2, A2:A11, 0)) finds the code in column A and returns the rate from the same row of column D.
Why learn it when XLOOKUP exists? INDEX and MATCH work in every version of every spreadsheet, you'll meet them in other people's files, and they do two-way lookups neatly: one MATCH for the row, another for the column, =INDEX(B2:E5, MATCH(H1, A2:A5, 0), MATCH(H2, B1:E1, 0)).
=INDEX(D2:D11, MATCH(G2, A2:A11, 0))
=INDEX(B2:E5, MATCH(H1, A2:A5, 0), MATCH(H2, B1:E1, 0))
The rate for the room code in G2; a rate from a grid by room type and season.