Slice off the top of each bulb to expose the cloves.
Place bulbs sliced part up on a piece of foil large enough to wrap them.
Drizzle oil over the top of the bulbs
Wrap the bulbs in the foil, place in a baking sheet then bake for about 40 to 45 mins in the preheated oven until tender and caramelized to your liking. Start checking at the 35 mins mark.
When it's cooked to your liking. Remove from the oven, let it cool then unwrap. Press out the bulbs and use in your recipes.
Air fryer method
Wrap garlic bulbs individually.
Place wrapped garlic bulbs in the air fryer basket and air fry at 380°F for 22 to 25 mins.
Let it cool before opening and pressing out the cloves.
Notes
You can season the bulbs lightly with salt and pepper before baking especially if you intent to use it as a spread for bread or to make dips like roasted garlic aioli.
If using the air fryer, wrap the bulbs individually.
Start checking at the 35 mins mark when cooking in the oven. It will give you an idea on how much time you need to get to your desired level of caramelization.