It matters in the sense that if you fail, it could hurt you.
But residency programs dont spend a lot of time on scores from international medical schools because the grading systems are different everywhere and it is kind of difficult to gauge how a number one student in your medical school even compares to a number 20 student on some other continent.
USMLE scores is the only thing homogeneous to IMGs so you need to do very well in that