The usage of local storage is plenty described in the How do I FAQ for Construct 2 and works the same for Construct 3.
Local storage is close to webstorage with an asynchronous behavior.
You'll need to use the action "Is existing" and manage both answer status in two separate events.
-> X is existing, set the key and the value.
-> X is missing, create the key, set it to the value you want.
X is set => You've just saved your key and its value.