The two musical devices may look similar, but they have different functions. The keyboard is simpler, reproduces prerecorded sounds, and will basically allow you to learn how to play the piano. Also, there aren’t many extra features on a keyboard.
Conversely, the synthesizer can produce unique sounds depending on the input. As such, if you’re shopping for a tool for the studio, the synthesizer will be a much better pick.