Homonyms are words that sound the same and are spelled the same but have different meanings. Your definition of homonym is totally wrong.
Also, a psychiatrist and psychologist are two different types of professionals . They have different training and qualifications. For instance, a psychiatrist has a medical degree which typically qualifies them to prescribe meds. A psychologist typically cannot prescribe.