Use Aperture Priority mode or Manual mode on cameras. Cameras which do not have the Aperture Priority or Manual mode will often allow selecting different scene settings, such as ‘dusk/dawn’, ‘nightlight’ or ‘sunset’ modes. Please choose which suits you and your camera best.
Below image photographed using a compact camera set on 'Night mode'
Bhupinder Ghatahora
Ghatahora Photography