With all the technical situations I deal with on a daily basis, even I was taken about at just how annoyingly difficult it is to try and replace a burnt out headlight bulb on new Volkswagen Beetles.
Fortunately, Google came to the rescue and led me to this guide. While the directions are for an older model, seeing the overall process helped with the 2006. In addition to the metal lever on the side of the assembly mentioned in the guide, there’s also a lock bolt that you have to rotate.
Once done, the entire assembly pulls out. Just make sure once you’re putting the assembly back, you push down on the metal lever so that the assembly can be fully locked back in place.