It sounds like you are trying to shoot in a) low light, and b) artificial light. If you post a picture with all the technical details on the Exif data (shutter speed, f/number, ISO will do) everything will be obvious.
All the camera can do is suggest settings that it thinks will give correct exposure. It will further moderate them in some modes for what it thinks might suit the subject, or to avoid obvious pitfalls, but it is far from infalible. That's where you come in.
In particular, in low light you are very likely to run into longer shutter speeds. Anything longer than the focal length reciprocal that Arkady mentioned above, say longer than 1/30sec perhaps in a typical situation, will result in blur due to movement of the camera (camera shake). You must use flash or a tripod.
Artifical light often results in some relatively light and dark areas in the same picture, not to mention unusual colour casts, unlike daylight which tends to spread more evenly across the scene. Cameras have trouble with that, which is why you have +/- exposure compensation controls. Sometimes the range of tones in a picture is too extreme for the sensor to handle, in which case you can never get everything perfect and you have to choose which areas are important.
The other thing is focus and again typical situations indoors in low light tend to me more problematic for AF systems.
It's not so much a question of trial and error. More a bit of learning and practise, then a bit more learning and some more practise. The basics are pretty easy TBH
