What is the name of 2 words that are spelled the same but have 2 different pronunciations for example record-verb and record-noun?

Well, technically in the example you used, "record" (noun) and "record" (verb) are"Homographs". They are words that share the same spelling but have different meanings. Since "record" (noun) and "record" (verb) also have different pronunciations, they are also "Heteronyms".

But to answer your question, two words that are spelled the same but have different pronunciations are called Heteronyms.