A HOMOPHONE is a word that SOUNDS the same as another word but differs in meaning, and may differ in spelling.
The words may be spelled the same, such as rose (flower) and rose (past tense of “rise”), or differently, such as carat, caret, and carrot, or to, two, and too.
A HOMOGRAPH is a word that has the same spelling/WRITING as another word but has a different sound and a different meaning. Examples include: lead (to go in front of)/lead (a metal); wind (to follow a course that is not straight)/wind (a gust of air); bass (low, deep sound)/bass (a type of fish)
You can remember the definitions if you break the words down to their roots:
“homo” = same & “phone” = sound/voice
“homo” = same & “graph” = write/draw
HOMOPHONES = SAME SOUND (but have different meaning and/or spelling
HOMOGRAPHS = SAME SPELLING (but different sound and meaning)