Peel the garlic cloves by soaking the unpeeled heads in lukewarm water for a few minutes. The skins should soften, making them easier to remove.
Place the garlic cloves, along with salt, pepper, thyme, and rosemary into a saucepan.
Pour in olive oil to fully coat the garlic cloves.
Heat the saucepan over low heat for 1 hour. The oil should simmer gently but not boil. Cooking time may vary depending on the size of the garlic cloves; larger cloves may require longer cooking.
Check cooking progress by carefully removing one clove with a slotted spoon and gently pressing between two fingers; the garlic clove should be slightly soft.
Allow to cool, then transfer to a clean, sealable glass jar. Ensure the cloves remain fully submerged in oil when stored in the refrigerator.
As you use the oil or remove cloves from the airtight jar, be sure to use a dedicated spoon and clean it after each use.
Spread the garlic confit on bread, toss it into pasta, veggies, or mashed potatoes, and enjoy!