Sorry, but this reply begins with that most irritating of comments - "it all depends".
One option is to do a demo which is the first hour or so of game play (depends on the expected length of the final game) so that the player can experience what the game is like, how the mechanics play out, at least an opening indication of story, characters etc. This approach allows for a wide range of feedback, including whether or not the opening of the game is engaging, and will often mean that the player can keep their save file to continue with a fuller version/final version of the game.
Another option is a demo which is more focused on one particular aspect of the game - battles, scavenging system, whatever. This would presumably be much shorter, so giving the player less of an overview, but would allow the dev to showcase their central game play. This can provide detailed feedback on that aspect. It might not, though, give the player enough to know if they want to try out the full game. Some players distrust this approach as there have been instances where the demo looks great, but the full game is mediocre because that single aspect doesn't reveal the lacklustre writing, or the number of bugs, or.... You get the picture.
In my own case, I have not released demos during development for any of my games so far. I do, however, provide a free demo on release of the beginning of the game, lasting about 1.5 hours, so that players have the chance to gauge if they want to buy the full version.