It seems to me the range of tones in both scenes is beyond the capability of your camera's sensor and you have neither captured detail in the shadows or detail in the highlights. Conventional wisdom is, I think, to capture detail in the highlights because nothing can bring back detail which is not there and there is a chance of bringing out detail in the shadows using software even if that area is underexposed.
The other option is to take two shots with the camera on a tripod, expose one for the highlights and the other for the shadows and then combine them in software.
Roger