Setting white balance for accurate colours
Different light sources have different colours. White balance tells the camera how to interpret those colours so that neutral subjects can look neutral, or so that you can deliberately make the photograph warmer or cooler.
Why colour changes
Different light sources have different colour characteristics. Your eyes adapt quickly, but a camera has to decide how neutral objects should be rendered. White balance is the camera's way of making that decision.
Auto white balance
Auto White Balance is a sensible starting point and modern cameras are often very good at it. Presets such as Daylight, Cloudy, Shade and Tungsten deliberately tell the camera what sort of light it is seeing.
RAW and white balance
With RAW files, white balance can usually be changed very freely during editing because the original capture data is retained. With JPEG or HEIF, the camera has already committed much more strongly to its processing.
