Preheat the air fryer to 380 degrees F (190 degrees C).
Cut the top off the head of garlic and place on a square piece of aluminum foil. Bring the foil up and around garlic. Pour olive oil on top and season with salt and pepper. Close ends of foil over garlic, creating a pouch.
Air fry until garlic is soft, 16 to 20 minutes. Open the foil pouch very carefully, as hot steam will escape.
Notes
Roasted garlic can be used for spreading on crusty bread, crackers, or making garlic toast.