Screenshot shortcut not working I tried to take a screenshot using command shift 4. 
The picture will appear on the desktop for a second and then disappear.
How do I fix this?
I've tried restart and it didn't work.
I'm running High Sierra 10.13.3
You can use the Terminal command defaults read on the .plist file which stores the screen capture settings to check the location and the graphic format of the screenshot file type:

defaults read com.apple.screencapture
{
    type = jpg;
}


The output above is the default setting for macOS. If another location appears in the output, that's where the screenshots are going.

If you want to reset the destination back to your Desktop, execute this Terminal command:

defaults write com.apple.screencapture location /Users/[yourusername]/Desktop

Want to change the file type from JPEG to PDF?

defaults write com.apple.screencapture type pdf

Other file type qualifiers are tiff, png, and gif.

To effect the defaults write changes on your current user session, you must execute this command when you are done:

killall SystemUIServer

Info gleaned from LifeWire.