Add your public key; never upload your private key
You can use an existing dedicated key. Otherwise, generate an Ed25519 key pair on your computer, set a passphrase, then add the contents of the .pub file to the SSH public key settings for your instance in the console.
ssh-keygen -t ed25519 \
-f ~/.ssh/osxbuild_ed25519
cat ~/.ssh/osxbuild_ed25519.pub
Keep your private key on your computer. Never paste it into a support ticket, email, or code repository. After uploading, follow the console prompts to confirm the public key is applied to the target instance.