The handiest answer is a solenoid or something like it. A coil of wire acting on a magnet or piece of iron/ steel.
You'll need to provide enough current to cause physical movement. This may take some experimenting with wire diameter, length of wire, number of turns, etc.
Do you mean the device has to fit within 5mm x 5mm x 20mm?
It's possible to make your own. Use many turns of wire known as 'magnet' (enamel-coated) wire.
An energized coil will attract a magnet. The magnet will release when current is shut off.
Or make a coil with a hollow core, so it will pull up on a magnet or metal rod when energized. The rod will try to center itself inside the coil, so consider making the metal portion short for light weight, then attach a light non-metallic portion to the top of the rod so it will extend upward 5mm.
If you wind the coil around 'soft iron' (example, a nail) then it's an electromagnet. It will attract another piece of soft iron when energized. Then they release when current is shut off. Avoid steel or tempered iron since they'll start retaining magnetism after a few uses.
You must arrange for gravity (or spring action) to return the metal piece to its original position.
The metal piece may be L-shaped, or hinged, or perhaps have a non-metallic piece attached to it. Or you can arrange for it to push or pull on an object obliquely and make it rise 5mm.