In Scratch there is a block to detect when a key is pressed then do something when it is pressed.
To start, do your normal things such as adding the green flag,
Bring the ‘if <> then’ block over to the script and add the <key [space] pressed> block into it.
Add the ‘move  steps’ block to the script,
Run the script and pres the space bar. Your sprite should move 10 steps each time you press it.