How much do Grade 9 and Grade 10 marks matter when applying to the US?

This is not something to worry about. The odds are against you. You should focus on doing the best you can do, and when the time comes, find colleges that you have a realistic chance of being accepted to. You’re a good student, and plenty of colleges would be delighted to have you.

To add to other comments, there will applicants from your country with perfect grades who won’t get in. Barring some outstanding achievement, your grades put you on the lower slopes of a very steep mountain.

Harvard and it’s peers won’t care that you had personal troubles, because there will students with personal troubles who still manage top grades. Posting a similar question isn’t going to change facts: your grades are what they are.