The Spanish hambre, for “hunger”, makes sense if you know two different patterns.
Firstly, the initial f-to-h pattern: words that began with an f- then a vowel in Latin tended to have the f- turned into an h- when Spanish evolved into Latin. Huir and Fugitive is another example of that pattern.
Secondly, the mn-to-mbr pattern: when the letters in Latin “m” and “n” appear together, often separated by a vowel, they usually became “mbr” as a unit in Spanish.
Thus the f-m-n of famine maps directly to the h-m-b-r of hambre.