The question is actually "when to use he hecho
and when hice
?".
For sure there are many posts with the same question here, so I'll make a summary.
In Spain (except the north part), we use he hecho
if the time when it happened is not over yet: today, THIS week, THIS month, THIS year...
(and anything that happened today still uses this one)
While hice
would be used if the time when it happened is already over: yesterday, last week, two weeks ago, last year, last century, and so on...
So, in short, if you've just done your homework, then it's still today → "he hecho".
If you're talking about the homework of this week, you'd also say "he hecho".
However, if you did them yesterday, you'd use "hice".
BUT, in the northern Spain AND practically all American Spanish uses always "hice". In fact, they're very unlikely to use compound forms.
Personally I don't like this because for me it implies a loss of information, but that's how it is. So... if your teacher is Colombian, then you have to choose. Neither of them can be incorrect.