Place peeled garlic cloves and fresh thyme or rosemary into a small baking-safe container.
Pour olive oil over the garlic and herbs until they are fully submerged.
Set the air fryer to 250°F and cook the garlic mixture for 1 hour, checking halfway and lowering the temperature to 200°F if the garlic starts to brown too quickly.
Make sure the oil is gently bubbling but not frying the garlic to avoid burning.
Once cooked, carefully let the container cool inside the air fryer until it’s safe to handle to avoid hot oil splatters.
Transfer the garlic and oil to a sealed jar and refrigerate; it can be stored up to 1 month.
Allow the oil to warm to room temperature before use, letting it return to liquid form if solidified in the fridge.
Use the confit garlic and infused oil in various dishes like dressings, spreads, or cooking for added depth and flavor.