Adding Answer due to lack of ability to add comment to @CoderMike's answer
It is important to note whether you have RASPBIAN STRETCH WITH DESKTOP installed or RASPBIAN STRETCH LITE.
Stretch LITE doesn't have a GUI installed, hence the LITE. If this is the environment you are booting into this could be the issue. The GUI doesn't exist.
It is recommended to use at least a 8gb SD card if you are using Stretch with Desktop. According to the website it states.
The Raspbian with Desktop image contained in the ZIP archive is over 4GB in size...
Since you have a 4gb SD Card, and the install of the OS is larger then 4gb. You may have a corrupt install of Raspbian on your SD card. Which may be causing your issues.
Note: I installed Startx on STRETCH LITE, and was unsuccessful (It wouldn't boot into GUI). I had to reinstall RASPBIAN WITH DESKTOP to successfully boot into the GUI