Cut the tops off the garlic bulbs/heads and peel most of the outer layer away. (You want some peel remaining on the outer cloves.) Place the garlic on a large sheet of aluminum foil.
Slowly drizzle the olive oil over the garlic bulbs, letting it seep in between the individual cloves. Sprinkle the top of the garlic bulbs with kosher salt and black pepper. (I like to add red pepper flakes as well.)
Tightly seal the foil around the garlic and place in an air fryer basket. Try to create some space between the top of the garlic bulbs and the foil.
Air fry for 40-50 minutes at 400ºF until the cloves begin to brown and are soft and jam-like. The size of garlic bulb may affect cook time so extend as necessary.
Let the garlic cool before unwrapping. You can squeeze the bulbs from the bottom to dislodge the cloves. Use a fork to smash the roasted garlic for spreads and dips or incorporate into your favorite garlic-heavy recipe.