Make sure your egg and oil are at room temperature, this is important. Put your egg and oil in the bottom of a glass jar that fits your immersion blender. Ideally, it should be a close fit.
Put the immersion blender down into the cup and rest it at the bottom. Turn it on and blend, keeping it at the bottom until you start to see the mayo thicken. Then gently raise the blender head to blend the rest of the mayo. Stop the machine when you see that the entire jar has thickened. Don’t over-blend or the mayo will 'break'. Note: If you see that the mixture turns creamy before you have raised the blender, you can stop.
Give it a stir and then cap the jar and store in the fridge. Eat it up within the week.
Notes
The size of your jar matters, if it is too big, you won't get an emulsion. Use a jar that just fits the ingredients and your immersion blender.
If you have trouble getting the mayo to thicken, add another egg.
If you want to flavor your mayo, you can add the juice of half a lemon and a teaspoon of mustard. That’s the classic seasoning, but of course you can do anything you want, it’s your mayonnaise ;)