What is the best way to capture the moon with a city background? The moon is so bright that if I do long exposure to capture the city, the moon will be completely blown out into a white star. Is HDR the only way?
This is the same as any photo where one part is way brighter than the other:
Graduated ND filter (only relevant if all the buildings are below the moon and you don't care about the exposure of the sky)
Take two photos and combine them manually (pretty easy in your case because you just have to copy-paste the moon between photos)
You might want to consider a Graduated ND filter. A graduated ND filter darkens the top half of the frame, allowing you to use a longer exposure than would otherwise be possible.
Personally, since the shot is probably going to be long exposure and doesn't move. I'd do two exposures and blend them together in post. It'll be the easiest and cheapest approach.
HDR could work, but getting the spread correct would be difficult and is overkill for your needs.
Graduated ND filters are great in situations where the bright part is going to cause bleed in to the darker portion of the image or you need to take a quick shot because there is motion you need to stop, but they are a reasonably expensive specialty item.
If you simply setup a tripod, take one photo of the moon and one photo of the skyline properly exposed, then you can overlap them in Photoshop and simply mask one on to the other. The night sky should allow for a pretty smooth gradient to be applied to blend the background or you can do it directly along the skyline if you prefer. You could also try an additive blend after removing the overexposed moon from the skyline shot.