The English language is a minefield where spelling and pronunciation are concerned. It’s no wonder it’s one of the most difficult languages to learn.
We have words that are spelt the same or pronounced the same but have different meanings (homonym) and words that are spelt differently but pronounced the same and have different meanings (homophone).
Just to recap here:
Homonym = Two or more words spelt the same or pronounced the same but having different meanings.