I am trying to find homologs for some proteins and I am wondering if it is better to find it by comparing the proteins or the coding genes or either is fine.
In most* scenarios you will probably want to look at a comparison of proteins following some additional matching that considers more than a single gene/protein. Luckily, this is a very common problem and one can often look up homologs through existing reference databases such as https://www.ncbi.nlm.nih.gov/homologene
Further, if genes are not present, their documentation will provide a good overview on ways to find homologs in other organisms.
*in some very special scenarios, gene sequences might be more suitable. For instance if one wanted to study similarity of non-coding regions of a gene. However these exceptions would seem beyond the general character of the question.