You're cooking garlic for too long
If garlic is the first thing you add to your pan, chances are it'll probably be the first thing to burn as well. If you know you're going to be cooking minced garlic over high heat, try adding it in last instead.