Cut the top third off of one or two heads of garlic, exposing the tops of the cloves.
Place the garlic on a sheet of aluminum foil and pour one tablespoon of olive oil on top of each head. Sprinkle a small amount of salt on the garlic and wrap in the aluminum foil.
In a 400 F degree oven bake the wrapped garlic head (or heads) on a pan for 50 to 60 minutes. Remove garlic from oven and allow to fully cool.
Once garlic is fully cooled, you can squeeze it to squirt out the softened roasted garlic into a bowl to be used in the next step.
If you have an immersion blender: Add all ingredients to your immersion blender cup or a cup/jar that is a little bit larger than your blender stick. Put blender on bottom of cup and start blending on low. Once you start to see things thickening, you can start to make a slight up and down movement. I like to stop every so often and kind of stir things around with the stick while the blender isn't running. But you should be able to get something that resembles mayonnaise texture in just a minute or two of blending. Once done you can skip to the last step.
If you do not have a blender, get ready to whisk: Grab a medium mixing bowl and a whisk.
Whisk the yolks, salt and lemon juice (if using) until it all is a bit frothy. Slowly trickle oil into bowl while whisking. Add more oil very slowly whisking the whole time. You will start to see things getting a bit thicker and at that point, you can add more oil.
Once things start to look more like a yogurt texture you can increase the flow of oil. But you still want to continue vigorously whisking. If you ever start to get a texture where your mayo looks like it's curdling, you need to stop adding oil until your texture binds back together.
You can stop whisking when you've used all your oil and the texture of your mayo is smooth.
At this point you will want to chop up your roasted garlic into fairly small pieces and stir it into the mayonnaise.
Put mayonnaise into a jar or sealed container and store in the fridge for no more than two weeks.