Spanish ID card control character calculator
Python 3, 83 bytes



lambda n:'TRWAGMYFPDXBNJZSQVHLCKE'[int([n,str(ord(n[0])%4)+n[1:]][n[0]in'XYZ'])%23]


Try it online!

-5 thanks to AlixEinsenhardt (from 99 to 94). -1 thanks to JonathanAllan.