Guess word

I need to create a basic game, but I’m starting in this world!
With programming I’ve been working for many years.

The game consists of allowing the player to enter a word to guess. This word has to be defined and saved somewhere beforehand (database, for example).
When the player hits that word, an image of an open safe will be displayed informing that the player has won.

Does anyone have a similar example for me to study? Any tips?