I just bought a pair for myself (dont know why I bought two).
I just cut the old one out and after the metal key is in the plastic head, I put the top part in by doing it at an angle as everybody else has said and just push it in against the wall or something.
Part number is A 000 766 44 06 -> For my W123.
It could be different for yours.
Do note: My original key is definitely different in design and is much more solid even though it's badly worn out. The original key's head can't be replaced unless *maybe* if I cut the plastic off.
2008 BMW 335i Coupe