The key is to protect it from the heating elements. That's why I wrap the cloves in foil before making roasted garlic in air fryer! You need to cover them or else they could burn.