First step, run this command:
EDITOR="code --wait" rails credentials:edit
When we run this command, a new key is created in config/master.key
as well as a credentials temp file thats opened in your text editor (in this case VSCode denoted by EDITOR="code --wait"
).